From 8e77cfce92783ac55490f6fa15c4665e9e11992c Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 5 Nov 2015 12:11:21 +0000 Subject: [PATCH] ITS#8301 remove assert in ber_get_next Just return error. --- libraries/liblber/io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ); -- 2.39.5