mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-23 19:46:56 -04:00
Audit of error codes
This commit is contained in:
parent
58e80a9ff7
commit
608b4b9134
38 changed files with 345 additions and 345 deletions
|
@ -271,12 +271,12 @@ int imail(struct zint_symbol *symbol, unsigned char source[], int length) {
|
|||
error_number = 0;
|
||||
|
||||
if (length > 32) {
|
||||
strcpy(symbol->errtxt, "Input too long (D50)");
|
||||
strcpy(symbol->errtxt, "450: Input too long");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
error_number = is_sane(SODIUM, source, length);
|
||||
if (error_number == ZINT_ERROR_INVALID_DATA) {
|
||||
strcpy(symbol->errtxt, "Invalid characters in data (D51)");
|
||||
strcpy(symbol->errtxt, "451: Invalid characters in data");
|
||||
return error_number;
|
||||
}
|
||||
|
||||
|
@ -311,11 +311,11 @@ int imail(struct zint_symbol *symbol, unsigned char source[], int length) {
|
|||
}
|
||||
|
||||
if (strlen(tracker) != 20) {
|
||||
strcpy(symbol->errtxt, "Invalid length tracking code (D52)");
|
||||
strcpy(symbol->errtxt, "452: Invalid length tracking code");
|
||||
return ZINT_ERROR_INVALID_DATA;
|
||||
}
|
||||
if (strlen(zip) > 11) {
|
||||
strcpy(symbol->errtxt, "Invalid ZIP code (D53)");
|
||||
strcpy(symbol->errtxt, "453: Invalid ZIP code");
|
||||
return ZINT_ERROR_INVALID_DATA;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue