Enforce maximum length of document type identifier

Fixes #113 reported by Daniel Gredler
This commit is contained in:
Robin Stuart 2018-07-05 21:27:26 +01:00
parent 951209331a
commit c83bea4ae0

View File

@ -449,7 +449,7 @@ int gs1_verify(struct zint_symbol *symbol, const unsigned char source[], const s
} }
if (ai_value[i] == 253) { // GDTI if (ai_value[i] == 253) { // GDTI
if ((data_length[i] < 14) || (data_length[i] > 31)) { if ((data_length[i] < 14) || (data_length[i] > 30)) {
error_latch = 1; error_latch = 1;
} else { } else {
error_latch = 0; error_latch = 0;