]> The Tcpdump Group git mirrors - libpcap/commit
Catch shifts > 31 bits generated by the optimizer.
authorGuy Harris <[email protected]>
Mon, 22 Oct 2018 08:58:04 +0000 (01:58 -0700)
committerGuy Harris <[email protected]>
Mon, 22 Oct 2018 08:58:04 +0000 (01:58 -0700)
commitda570b00101b264004db032b4e67b90600b0edaf
tree07d05ea78bcb0883c141a6608fa05c630eb4fbb9
parent4d6e12cd183cda6eade8cac4244089cee0048c7e
Catch shifts > 31 bits generated by the optimizer.

We already caught them in the code generator - but only if they were
between 31 and 2^31-1, but we weren't catching them when shifts by the X
register got optimized into shifts by a constant, so we need to:

1) catch it in the optimizer;

2) fix the check in the code generator.

(In the longer run, we need to clear up signed vs. unsigned stuff in the
code generator and optimizer.)

Credit to OSS-Fuzz for finding the optimizer issue (which was using a
shift constant that was "negative", thus pointing out the code generator
issue).
gencode.c
optimize.c