1
0
mirror of https://git.code.sf.net/p/zint/code synced 2025-12-21 03:47:07 +00:00

Bugfix: Allocate sufficient memory for larger data strings

This commit is contained in:
Robin Stuart
2016-08-29 18:45:58 +01:00
parent 3cf8a142b8
commit f89167c30b
2 changed files with 13 additions and 8 deletions

View File

@@ -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;
}