commit | 805ed7a2d4e5e3f7a337fc51af26a3339ac24606 | [log] [tgz] |
---|---|---|
author | John Bowler <jbowler@acm.org> | Wed Jan 31 19:45:18 2024 -0800 |
committer | John Bowler <jbowler@acm.org> | Fri Feb 02 01:39:48 2024 -0800 |
tree | 4f0fd73d8b88fb6a3ad2aeec17ae41dd8a86e7a6 | |
parent | 2aebfb4aa97f930deaa8b16e3f67401a29547680 [diff] |
Correct row width check in png_check_IHDR This changes the mask used in the IHDR width check from ~7U to ~(png_alloc_size_t)7 which is a quantity at least as big as both png_uint_32 and size_t whereas "7U" will be 16 bits on a 16 bit system. The change both corrects a bug in the code (on 16 bit systems) and removes compiler warnings about the test always being false on 64-bit architectures. Signed-off-by: John Bowler <jbowler@acm.org>