X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Fliblber%2Fio.c;h=c0bca10fbf2511c6c6959ddd2dfd13737e3f9940;hb=9b5972dc9e14e1f7a7bef755bfd0dc61bcf1ffb3;hp=c05dcf8434a42c5be71614da7e63e53c2f18cc6c;hpb=397653b2e28991a8db1d4be54ab3fac38d88edd1;p=openldap diff --git a/libraries/liblber/io.c b/libraries/liblber/io.c index c05dcf8434..c0bca10fbf 100644 --- a/libraries/liblber/io.c +++ b/libraries/liblber/io.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2015 The OpenLDAP Foundation. + * Copyright 1998-2016 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -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 );