This fixes some undefined behavior in which we subtract the remaining
length of the path attributes from the remaining length of the packet,
where the former is greater than the latter and they're both unsigned.
+ /* Make sure the path attributes don't go past the end of the packet */
+ if (length < len)
+ goto trunc;
/* do something more useful!*/
while (len) {
uint8_t aflags, atype, alenlen;
/* do something more useful!*/
while (len) {
uint8_t aflags, atype, alenlen;