From: Howard Chu Date: Thu, 5 Nov 2015 12:11:21 +0000 (+0000) Subject: ITS#8301 remove assert in ber_get_next X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8e77cfce92783ac55490f6fa15c4665e9e11992c;p=openldap ITS#8301 remove assert in ber_get_next Just return error. --- diff --git a/libraries/liblber/io.c b/libraries/liblber/io.c index c05dcf8434..0726d82895 100644 --- a/libraries/liblber/io.c +++ b/libraries/liblber/io.c @@ -656,7 +656,8 @@ ber_get_next( ber_slen_t to_go; to_go = ber->ber_end - ber->ber_rwptr; - assert( to_go > 0 ); + /* unsigned/signed overflow */ + if (to_go<0) return LBER_DEFAULT; sock_errset(0); res = ber_int_sb_read( sb, ber->ber_rwptr, to_go );