sample_conv_eth_vlan() reads the VLAN TCI at area[idx + 2] without
ensuring there are enough bytes. The original condition 'idx + 4 < data'
breaks when there IS room for more data, leading to an incomplete read
when trying to decode a VLAN ID.
This can be backported where this converter was backported.
smp->flags &= ~SMP_F_CONST;
return !!vlan;
}
- if (idx + 4 < smp->data.u.str.data)
+ if (idx + 4 > smp->data.u.str.data)
break;
-
vlan = read_n16(smp->data.u.str.area + idx + 2) & 0xfff;
}
/* incomplete header */