diff options
author | Steve Holme <steve_holme@hotmail.com> | 2013-04-19 14:11:43 +0100 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2013-04-19 14:11:43 +0100 |
commit | cc7f6a2ddfa2978fe0cf8b2249ba278ce9122d0d (patch) | |
tree | b30fdf7551527a09dd339facdf5e8339e520bdda | |
parent | 90fe59b829bd931d934cd70dc2f21c21109849dc (diff) |
url: Added size_t cast to pointer based length calculations
-rw-r--r-- | lib/url.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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) { |