mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-22 11:15:16 -04:00
Bugfix: Allocate sufficient memory for larger data strings
This commit is contained in:
parent
3cf8a142b8
commit
f89167c30b
2 changed files with 13 additions and 8 deletions
|
@ -481,7 +481,7 @@ int code_128(struct zint_symbol *symbol, unsigned char source[], int length) {
|
|||
glyph_count = glyph_count + 1.0;
|
||||
}
|
||||
}
|
||||
if (glyph_count > 80.0) {
|
||||
if (glyph_count > 60.0) {
|
||||
strcpy(symbol->errtxt, "Input too long");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
|
@ -842,7 +842,7 @@ int ean_128(struct zint_symbol *symbol, unsigned char source[], int length) {
|
|||
glyph_count = glyph_count + 1.0;
|
||||
}
|
||||
}
|
||||
if (glyph_count > 80.0) {
|
||||
if (glyph_count > 60.0) {
|
||||
strcpy(symbol->errtxt, "Input too long");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue