From: Stig Venaas Date: Tue, 16 Jul 2002 02:38:14 +0000 (+0000) Subject: Fixes ITS#1935 X-Git-Tag: NO_SLAP_OP_BLOCKS~1362 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=26b33bf6146a9cd0a3defcce46d0aeddac1ab6a9;p=openldap Fixes ITS#1935 --- diff --git a/libraries/libldap/url.c b/libraries/libldap/url.c index 6b9e756cd3..8bf8bd56d5 100644 --- a/libraries/libldap/url.c +++ b/libraries/libldap/url.c @@ -1137,12 +1137,14 @@ ldap_pvt_hex_unescape( char *s ) for ( p = s; *s != '\0'; ++s ) { if ( *s == '%' ) { - if ( *++s != '\0' ) { - *p = ldap_int_unhex( *s ) << 4; + if ( *++s == '\0' ) { + break; } - if ( *++s != '\0' ) { - *p++ += ldap_int_unhex( *s ); + *p = ldap_int_unhex( *s ) << 4; + if ( *++s == '\0' ) { + break; } + *p++ += ldap_int_unhex( *s ); } else { *p++ = *s; }