mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-15 07:34:35 -04:00
Protect DotCode from dimensions smaller than 5
This commit is contained in:
parent
411f083f57
commit
4c1c180fbf
1 changed files with 6 additions and 1 deletions
|
@ -1282,7 +1282,12 @@ int dotcode(struct zint_symbol *symbol, const unsigned char source[], int length
|
|||
}
|
||||
|
||||
if ((height > 200) || (width > 200)) {
|
||||
strcpy(symbol->errtxt, "526: Specified symbol size is too large (E20)");
|
||||
strcpy(symbol->errtxt, "526: Specified symbol size is too large");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
if ((height < 5) || (width < 5)) {
|
||||
strcpy(symbol->errtxt, "527: Specified symbol size has a dimension which is too small");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue