1
0
Fork 0
mirror of https://git.code.sf.net/p/zint/code synced 2025-05-21 18:55:11 -04:00

CODEONE: is_last_single_ascii() out-of-bounds sp + 1, CI-Fuzz, props Jan Schrewe

This commit is contained in:
gitlost 2021-07-05 11:52:43 +01:00
parent bcf6eff93c
commit 9b02cd5221
2 changed files with 3 additions and 3 deletions
backend

View file

@ -316,7 +316,7 @@ static int c1_look_ahead_test(const unsigned char source[], const int sourcelen,
/* Whether can fit last character or characters in a single ASCII codeword */
static int is_last_single_ascii(const unsigned char string[], const int length, const int sp) {
if (length - sp == 1 && string[sp + 1] <= 127) {
if (length - sp == 1 && string[sp] <= 127) {
return 1;
}
if (length - sp == 2 && istwodigits(string, length, sp)) {