Again, fixed decoding of negative integers in snmp_asn1_dec_s32t(), tnx to though testing by Sander.

This commit is contained in:
christiaans 2006-10-13 13:45:06 +00:00
parent bc182cab7c
commit 4e583dab2e

View File

@ -366,12 +366,14 @@ snmp_asn1_dec_s32t(struct pbuf *p, u16_t ofs, u16_t len, s32_t *value)
if (sign)
{
*lsb_ptr &= *msg_ptr;
*value <<= 8;
*lsb_ptr |= 255;
}
else
{
*lsb_ptr |= *msg_ptr;
}
*value <<= 8;
}
ofs += 1;
if (ofs >= plen)
{