mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-17 16:44:34 -04:00
cppcheck: fix reports
[backend/bmp.c:133]: (error) Memory leak: bitmap [backend/bmp.c:126]: (error) Memory leak: bitmap [backend/composite.c:464]: (error) Array index -1 is out of bounds. [backend/composite.c:507]: (error) Array index -1 is out of bounds. [backend/dmatrix.c:962]: (style) Redundant condition: i!=0. 'i==0 || (i!=0 && binary[i-1]!='b')' is equivalent to 'i==0 || binary[i-1]!='b'' [backend/raster.c:122]: (error) Memory leak: rotated_pixbuf [backend/raster.c:506]: (error) Memory leak: pixelbuf [frontend/main.c:273]: (error) Uninitialized variable: format_string [frontend_qt/exportwindow.cpp:103]: (style) Array index 'j' is used before limits check.
This commit is contained in:
parent
0d6716a773
commit
3257a5c0af
6 changed files with 15 additions and 3 deletions
|
@ -266,6 +266,7 @@ int batch_process(struct zint_symbol *symbol, char *filename, int mirror_mode, c
|
|||
char adjusted[2];
|
||||
|
||||
memset(buffer, 0, sizeof (unsigned char) * 7100);
|
||||
memset(format_string, 0, sizeof (unsigned char) * 127);
|
||||
if (symbol->outfile[0] == '\0') {
|
||||
strcpy(format_string, "~~~~~.");
|
||||
strcat(format_string, filetype);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue