]> wimlib.net Git - wimlib/commitdiff
{lzx,xpress}_decode_match(): Fix undefined pointer evalution
authorEric Biggers <ebiggers3@gmail.com>
Fri, 1 Nov 2013 05:19:32 +0000 (00:19 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Fri, 1 Nov 2013 05:42:06 +0000 (00:42 -0500)
According to C99 6.5.6.8, calculating a pointer that points before the
allocated object has undefined behavior.  However, this was done by
lzx_decode_match() and xpress_decode_match() if they received a match
pointing before the end of the window (invalid match offset).  This
commit fixes this check to be fully defined.

This change likely has no visible effect in actual builds, e.g. with gcc.


No differences found