diff options
| author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-07-21 14:42:32 -0700 |
|---|---|---|
| committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-07-21 14:43:24 -0700 |
| commit | 8dee1b3a8008202810e18c06bf78b3b05409ffaf (patch) | |
| tree | ed1171ee416f5183039e2c6f66f70582fe416d42 | |
| parent | daba8411d9a658f0fec116f36550652aa7dfabe9 (diff) | |
bdfReadBitmap: avoid access to byte before start of array
Clears 4 -Wanalyzer-out-of-bounds warnings from gcc 14.1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/util/bdftopcf/-/merge_requests/7>
| -rw-r--r-- | bdfread.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -152,7 +152,7 @@ bdfReadBitmap(CharInfoPtr pCI, FontFilePtr file, int bit, int byte, for (i = widthHexChars - inLineLen; i > 0; i--) picture[nextByte++] = 0; } - else { + else if (nextByte > 0) { unsigned char mask; mask = 0xff << (8 - (widthBits & 0x7)); |
