The errors were:
print-cdp.c:363:13: runtime error: unsigned integer overflow: 0 - 1
cannot be represented in type 'u_int' (aka 'unsigned int')
print-cdp.c:375:13: runtime error: unsigned integer overflow: 0 - 1
cannot be represented in type 'u_int' (aka 'unsigned int')
if (p + pl > endp)
goto trunc;
ND_PRINT("pt=0x%02x, pl=%u, pb=", EXTRACT_U_1((p - 2)), pl);
- while (pl-- > 0) {
+ while (pl != 0) {
ND_PRINT(" %02x", EXTRACT_U_1(p));
p++;
+ pl--;
}
ND_TCHECK_2(p);
if (p + 2 > endp)
ND_TCHECK_LEN(p, al);
if (p + al > endp)
goto trunc;
- while (al-- > 0) {
+ while (al != 0) {
ND_PRINT(" %02x", EXTRACT_U_1(p));
p++;
+ al--;
}
}
num--;