mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13: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:
committed by
Robin Stuart
parent
0d6716a773
commit
3257a5c0af
@ -461,6 +461,7 @@ static int cc_b(struct zint_symbol *symbol, char source[], int cc_width) {
|
||||
|
||||
/* Now we have the variant we can load the data - from here on the same as MicroPDF417 code */
|
||||
variant--;
|
||||
assert(variant >= 0);
|
||||
symbol->option_2 = MicroVariants[variant]; /* columns */
|
||||
symbol->rows = MicroVariants[variant + 34]; /* rows */
|
||||
k = MicroVariants[variant + 68]; /* number of EC CWs */
|
||||
|
Reference in New Issue
Block a user