mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-28 05:54:19 -04:00
Audit of error codes
This commit is contained in:
parent
58e80a9ff7
commit
608b4b9134
38 changed files with 345 additions and 345 deletions
|
@ -58,12 +58,12 @@ int plessey(struct zint_symbol *symbol, unsigned char source[], const size_t len
|
|||
int error_number;
|
||||
|
||||
if (length > 65) {
|
||||
strcpy(symbol->errtxt, "Input too long (C70)");
|
||||
strcpy(symbol->errtxt, "370: Input too long");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
error_number = is_sane(SSET, source, length);
|
||||
if (error_number == ZINT_ERROR_INVALID_DATA) {
|
||||
strcpy(symbol->errtxt, "Invalid characters in data (C71)");
|
||||
strcpy(symbol->errtxt, "371: Invalid characters in data");
|
||||
return error_number;
|
||||
}
|
||||
checkptr = (unsigned char *) calloc(1, length * 4 + 8);
|
||||
|
@ -116,7 +116,7 @@ int msi_plessey(struct zint_symbol *symbol, unsigned char source[], const size_t
|
|||
char dest[512]; /* 2 + 55 * 8 + 3 + 1 ~ 512 */
|
||||
|
||||
if (length > 55) {
|
||||
strcpy(symbol->errtxt, "Input too long (C72)");
|
||||
strcpy(symbol->errtxt, "372: Input too long");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,7 @@ int msi_plessey_mod10(struct zint_symbol *symbol, unsigned char source[], int le
|
|||
error_number = 0;
|
||||
|
||||
if (length > 18) {
|
||||
strcpy(symbol->errtxt, "Input too long (C73)");
|
||||
strcpy(symbol->errtxt, "373: Input too long");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
|
||||
|
@ -216,7 +216,7 @@ int msi_plessey_mod1010(struct zint_symbol *symbol, unsigned char source[], cons
|
|||
|
||||
if (src_len > 18) {
|
||||
/* No Entry Stack Smashers! limit because of str->number conversion*/
|
||||
strcpy(symbol->errtxt, "Input too long (C74)");
|
||||
strcpy(symbol->errtxt, "374: Input too long");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
|
||||
|
@ -317,7 +317,7 @@ int msi_plessey_mod11(struct zint_symbol *symbol, unsigned char source[], const
|
|||
error_number = 0;
|
||||
|
||||
if (src_len > 55) {
|
||||
strcpy(symbol->errtxt, "Input too long (C75)");
|
||||
strcpy(symbol->errtxt, "375: Input too long");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
|
||||
|
@ -380,7 +380,7 @@ int msi_plessey_mod1110(struct zint_symbol *symbol, unsigned char source[], cons
|
|||
error_number = 0;
|
||||
|
||||
if (src_len > 18) {
|
||||
strcpy(symbol->errtxt, "Input too long (C76)");
|
||||
strcpy(symbol->errtxt, "376: Input too long");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
|
||||
|
@ -466,7 +466,7 @@ int msi_handle(struct zint_symbol *symbol, unsigned char source[], int length) {
|
|||
|
||||
error_number = is_sane(NEON, source, length);
|
||||
if (error_number != 0) {
|
||||
strcpy(symbol->errtxt, "Invalid characters in input data (C77)");
|
||||
strcpy(symbol->errtxt, "377: Invalid characters in input data");
|
||||
return ZINT_ERROR_INVALID_DATA;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue