mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-02 11:59:45 -05:00
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:
parent
78ecd45ff7
commit
b0f486e72e
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue