mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-14 07:04:34 -04:00
Overflow bug fix
This commit is contained in:
parent
944a754fee
commit
0400d9d280
3 changed files with 18 additions and 13 deletions
|
@ -71,6 +71,11 @@ int qr_code(struct zint_symbol *symbol, unsigned char source[])
|
|||
int errno = 0;
|
||||
int i, j;
|
||||
|
||||
if(ustrlen(source) > 5254) {
|
||||
strcpy(symbol->errtxt, "input data too long [580]");
|
||||
return ERROR_TOO_LONG;
|
||||
}
|
||||
|
||||
code = encode(symbol->option_1, symbol->option_2, source);
|
||||
if(code == NULL) {
|
||||
strcpy(symbol->errtxt, "libqrencode failed to encode the input data [581]");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue