aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-04-19 14:11:43 +0100
committerSteve Holme <steve_holme@hotmail.com>2013-04-19 14:11:43 +0100
commitcc7f6a2ddfa2978fe0cf8b2249ba278ce9122d0d (patch)
treeb30fdf7551527a09dd339facdf5e8339e520bdda
parent90fe59b829bd931d934cd70dc2f21c21109849dc (diff)
url: Added size_t cast to pointer based length calculations
-rw-r--r--lib/url.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index 7519ee0cb..bd07059bc 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -4494,9 +4494,11 @@ static CURLcode parse_login_details(const char *login, const size_t len,
(size_t)(osep && psep > osep ? osep - login : psep - login) :
(osep ? (size_t)(osep - login) : len));
plen = (psep ?
- (osep && osep > psep ? osep - psep : login + len - psep) - 1 : 0);
+ (osep && osep > psep ? (size_t)(osep - psep) :
+ (size_t)(login + len - psep)) - 1 : 0);
olen = (osep ?
- (psep && psep > osep ? psep - osep : login + len - osep) - 1 : 0);
+ (psep && psep > osep ? (size_t)(psep - osep) :
+ (size_t)(login + len - osep)) - 1 : 0);
/* Allocate the user portion temporary buffer */
if(userp && ulen) {