mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-30 06:45:28 -04:00
malloc/calloc: check for NULL always (11.1.0 gcc -fanalyzer -c backend/*.c)
ZBarcode_Encode: don't reinit symbol->outfile, props Alonso Schaich frontend/test_args: skip long filename tests on Windows, props Alonso Schaich
This commit is contained in:
parent
8c419ab4fb
commit
368633bda4
9 changed files with 131 additions and 55 deletions
|
@ -66,7 +66,10 @@ INTERNAL int plessey(struct zint_symbol *symbol, unsigned char source[], int len
|
|||
strcpy(symbol->errtxt, "371: Invalid characters in data");
|
||||
return error_number;
|
||||
}
|
||||
checkptr = (unsigned char *) calloc(1, length * 4 + 8);
|
||||
if (!(checkptr = (unsigned char *) calloc(1, length * 4 + 8))) {
|
||||
strcpy(symbol->errtxt, "373: Insufficient memory for check digit CRC buffer");
|
||||
return ZINT_ERROR_MEMORY;
|
||||
}
|
||||
|
||||
/* Start character */
|
||||
strcpy(dest, "31311331");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue