mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Trap out of range values - Databar Limited
This commit is contained in:
parent
74cfab11f0
commit
f121cf65ac
@ -669,6 +669,12 @@ int rsslimited(struct zint_symbol *symbol, unsigned char source[])
|
|||||||
strcpy(symbol->errtxt, "Invalid characters in data");
|
strcpy(symbol->errtxt, "Invalid characters in data");
|
||||||
return error_number;
|
return error_number;
|
||||||
}
|
}
|
||||||
|
if(ustrlen(source) == 13) {
|
||||||
|
if((source[0] != '0') && (source[0] != '1')) {
|
||||||
|
strcpy(symbol->errtxt, "Input out of range");
|
||||||
|
return ERROR_INVALID_DATA;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* make some room for a separator row for composite symbols */
|
/* make some room for a separator row for composite symbols */
|
||||||
if(symbol->symbology == BARCODE_RSS_LTD_CC) {
|
if(symbol->symbology == BARCODE_RSS_LTD_CC) {
|
||||||
|
Loading…
Reference in New Issue
Block a user