IPX: Add two length checks
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>
Sat, 6 Nov 2021 15:58:42 +0000 (16:58 +0100)
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>
Mon, 29 Nov 2021 13:11:12 +0000 (14:11 +0100)
commitddf590c14278769bb2e1a7b7a87ce98ae23bc549
tree2979533bf1d5f924807c9fb626d5d3dc2111249e
parent69c0a4b0cc491748c919c0940b2f5b02f53f4354
IPX: Add two length checks

This change fixes some undefined behaviors at runtime.

The errors were like:
print-ipx.c:160:12: runtime error: unsigned integer overflow:
  1 - 2 cannot be represented in type 'unsigned int'
print-ipx.c:233:12: runtime error: unsigned integer overflow:
  1 - 2 cannot be represented in type 'unsigned int'
print-ipx.c