mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-30 15:15:05 +00:00
Again, fixed decoding of negative integers in snmp_asn1_dec_s32t(), tnx to though testing by Sander.
This commit is contained in:
parent
bc182cab7c
commit
4e583dab2e
@ -366,12 +366,14 @@ snmp_asn1_dec_s32t(struct pbuf *p, u16_t ofs, u16_t len, s32_t *value)
|
|||||||
if (sign)
|
if (sign)
|
||||||
{
|
{
|
||||||
*lsb_ptr &= *msg_ptr;
|
*lsb_ptr &= *msg_ptr;
|
||||||
|
*value <<= 8;
|
||||||
|
*lsb_ptr |= 255;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*lsb_ptr |= *msg_ptr;
|
*lsb_ptr |= *msg_ptr;
|
||||||
|
*value <<= 8;
|
||||||
}
|
}
|
||||||
*value <<= 8;
|
|
||||||
ofs += 1;
|
ofs += 1;
|
||||||
if (ofs >= plen)
|
if (ofs >= plen)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user