• J
    Unsigned overflow · 319c9852
    John Bowler 提交于
    Remove all currently detected cases of unsigned overflow.  Detection is
    runtime, so test case dependent.  The changes to pngvalid.c eliminate
    spurious and probably invalid tests with one while loop exception.
    
    Apart from that and the change to the dependence on the intended
    unsigned overflow in pngtrans.c the changes are limited to altering the
    meme for an unsigned 'x' from:
    
       while (x-- > 0)
    
    to
    
       for (; x > 0; --x)
    
    This works because, in all cases, the control variable is not used in
    the loop.  The 'while' meme was, at one time, warn'ed by GCC so it is
    probably a good change, for some weird religious value of good.
    Signed-off-by: NJohn Bowler <jbowler@acm.org>
    319c9852
pngunknown.c 35.6 KB