From 14f1138ab586bf6c066de26da3fea23ae631ecba Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 27 Jun 2008 02:36:41 +0000 Subject: [PATCH] ITS#5580 fix length decoding, verified with PROTOS --- libraries/liblber/io.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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