From: Howard Chu Date: Fri, 27 Jun 2008 02:36:41 +0000 (+0000) Subject: ITS#5580 fix length decoding, verified with PROTOS X-Git-Tag: LOCKER_IDS~86 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=14f1138ab586bf6c066de26da3fea23ae631ecba;p=openldap ITS#5580 fix length decoding, verified with PROTOS --- diff --git a/libraries/liblber/io.c b/libraries/liblber/io.c index a85f081aa4..bceb742b48 100644 --- a/libraries/liblber/io.c +++ b/libraries/liblber/io.c @@ -584,13 +584,11 @@ ber_get_next( return LBER_DEFAULT; } /* Not enough bytes? */ - if (ber->ber_rwptr - (char *)p < llen) { -#if defined( EWOULDBLOCK ) - sock_errset(EWOULDBLOCK); -#elif defined( EAGAIN ) - sock_errset(EAGAIN); -#endif - return LBER_DEFAULT; + i = ber->ber_rwptr - (char *)p; + if (i < llen) { + sblen=ber_int_sb_read( sb, ber->ber_rwptr, i ); + if (sblenber_rwptr += sblen; } for (i=0; i