ITS#10401 liblber: fix shift of negative int in ber_decode_int()

There's no actual possibility of overflow but sanitizers will complain.
This commit is contained in:
Howard Chu 2025-10-16 17:25:14 +01:00
parent 78ecd45ff7
commit b0f486e72e

View file

@ -313,7 +313,7 @@ ber_decode_int( const struct berval *bv, ber_int_t *num )
/* shift in the bytes */
for( i = 1; i < len; i++ ) {
netnum = (netnum << 8 ) | buf[i];
netnum = ((unsigned)netnum << 8 ) | buf[i];
}
*num = netnum;