mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13: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:
@ -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");
|
||||
|
Reference in New Issue
Block a user