Task #118787 - fixed.err
back to task #118787download
Error: GCC_ANALYZER_WARNING (CWE-476):
dtc-1.7.2/./pylibfdt/libfdt_wrap.c:724:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘iter’
dtc-1.7.2/./pylibfdt/libfdt_wrap.c:9576:22: enter_function: entry to ‘_wrap_fdt_strerror’
dtc-1.7.2/./pylibfdt/libfdt_wrap.c:9585:6: branch_false: following ‘false’ branch (when ‘args’ is non-NULL)...
dtc-1.7.2/./pylibfdt/libfdt_wrap.c:9587:12: branch_false: ...to here
dtc-1.7.2/./pylibfdt/libfdt_wrap.c:9587:12: call_function: calling ‘SWIG_AsVal_int’ from ‘_wrap_fdt_strerror’
dtc-1.7.2/./pylibfdt/libfdt_wrap.c:9587:12: return_function: returning to ‘_wrap_fdt_strerror’ from ‘SWIG_AsVal_int’
dtc-1.7.2/./pylibfdt/libfdt_wrap.c:9588:6: branch_false: following ‘false’ branch...
dtc-1.7.2/./pylibfdt/libfdt_wrap.c:9591:3: branch_false: ...to here
dtc-1.7.2/./pylibfdt/libfdt_wrap.c:9593:15: call_function: calling ‘SWIG_FromCharPtr’ from ‘_wrap_fdt_strerror’
# 722| swig_module_info *iter = start;
# 723| do {
# 724|-> if (iter->size) {
# 725| size_t l = 0;
# 726| size_t r = iter->size - 1;
Error: GCC_ANALYZER_WARNING (CWE-457):
dtc-1.7.2/convert-dtsv0-lexer.lex.c:1327:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*yy_cp’
dtc-1.7.2/convert-dtsv0-lexer.l:216:5: enter_function: entry to ‘main’
dtc-1.7.2/convert-dtsv0-lexer.l:226:12: branch_false: following ‘false’ branch (when ‘argc > 1’)...
dtc-1.7.2/convert-dtsv0-lexer.l:226:12: branch_false: ...to here
dtc-1.7.2/convert-dtsv0-lexer.l:229:21: branch_true: following ‘true’ branch (when ‘i < argc’)...
dtc-1.7.2/convert-dtsv0-lexer.l:230:78: branch_true: ...to here
dtc-1.7.2/convert-dtsv0-lexer.l:231:17: call_function: calling ‘convert_file’ from ‘main’
# 1325|
# 1326| for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
# 1327|-> {
# 1328| YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
# 1329| if ( yy_accept[yy_current_state] )
Error: GCC_ANALYZER_WARNING (CWE-775):
dtc-1.7.2/convert-dtsv0-lexer.lex.c:1508:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘yyin’
dtc-1.7.2/convert-dtsv0-lexer.l:190:13: enter_function: entry to ‘convert_file’
dtc-1.7.2/convert-dtsv0-lexer.l:196:19: call_function: calling ‘xmalloc’ from ‘convert_file’
dtc-1.7.2/convert-dtsv0-lexer.l:196:19: return_function: returning to ‘convert_file’ from ‘xmalloc’
dtc-1.7.2/convert-dtsv0-lexer.l:200:16: acquire_resource: opened here
dtc-1.7.2/convert-dtsv0-lexer.l:201:12: branch_false: following ‘false’ branch...
dtc-1.7.2/convert-dtsv0-lexer.l:205:17: branch_false: ...to here
dtc-1.7.2/convert-dtsv0-lexer.l:206:12: branch_false: following ‘false’ branch...
dtc-1.7.2/convert-dtsv0-lexer.l:206:12: branch_false: ...to here
dtc-1.7.2/convert-dtsv0-lexer.l:210:15: call_function: calling ‘yylex’ from ‘convert_file’
# 1506| {
# 1507| (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
# 1508|-> (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
# 1509| yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
# 1510| (yy_hold_char) = *(yy_c_buf_p);
Error: GCC_ANALYZER_WARNING (CWE-401):
dtc-1.7.2/convert-dtsv0-lexer.lex.c:1508:9: warning[-Wanalyzer-malloc-leak]: leak of ‘yyin’
dtc-1.7.2/convert-dtsv0-lexer.l:190:13: enter_function: entry to ‘convert_file’
dtc-1.7.2/convert-dtsv0-lexer.l:196:19: call_function: calling ‘xmalloc’ from ‘convert_file’
dtc-1.7.2/convert-dtsv0-lexer.l:196:19: return_function: returning to ‘convert_file’ from ‘xmalloc’
dtc-1.7.2/convert-dtsv0-lexer.l:200:16: acquire_memory: allocated here
dtc-1.7.2/convert-dtsv0-lexer.l:201:12: branch_false: following ‘false’ branch...
dtc-1.7.2/convert-dtsv0-lexer.l:205:17: branch_false: ...to here
dtc-1.7.2/convert-dtsv0-lexer.l:206:12: branch_false: following ‘false’ branch...
dtc-1.7.2/convert-dtsv0-lexer.l:206:12: branch_false: ...to here
dtc-1.7.2/convert-dtsv0-lexer.l:210:15: call_function: calling ‘yylex’ from ‘convert_file’
# 1506| {
# 1507| (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
# 1508|-> (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
# 1509| yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
# 1510| (yy_hold_char) = *(yy_c_buf_p);
Error: GCC_ANALYZER_WARNING (CWE-401):
dtc-1.7.2/convert-dtsv0-lexer.lex.c:1531:54: warning[-Wanalyzer-malloc-leak]: leak of ‘yyalloc(64)’
dtc-1.7.2/convert-dtsv0-lexer.l:190:13: enter_function: entry to ‘convert_file’
dtc-1.7.2/convert-dtsv0-lexer.l:196:19: call_function: calling ‘xmalloc’ from ‘convert_file’
dtc-1.7.2/convert-dtsv0-lexer.l:196:19: return_function: returning to ‘convert_file’ from ‘xmalloc’
dtc-1.7.2/convert-dtsv0-lexer.l:201:12: branch_false: following ‘false’ branch...
dtc-1.7.2/convert-dtsv0-lexer.l:205:17: branch_false: ...to here
dtc-1.7.2/convert-dtsv0-lexer.l:206:12: branch_false: following ‘false’ branch...
dtc-1.7.2/convert-dtsv0-lexer.l:206:12: branch_false: ...to here
dtc-1.7.2/convert-dtsv0-lexer.l:210:15: call_function: calling ‘yylex’ from ‘convert_file’
# 1529| /* yy_ch_buf has to be 2 characters longer than the size given because
# 1530| * we need to put in 2 end-of-buffer characters.
# 1531|-> */
# 1532| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 1533| if ( ! b->yy_ch_buf )
Error: CPPCHECK_WARNING (CWE-476):
dtc-1.7.2/convert-dtsv0-lexer.lex.c:1572: warning[nullPointer]: Possible null pointer dereference: b
# 1570|
# 1571| yy_flush_buffer( b );
# 1572|->
# 1573| b->yy_input_file = file;
# 1574| b->yy_fill_buffer = 1;
Error: CPPCHECK_WARNING (CWE-476):
dtc-1.7.2/convert-dtsv0-lexer.lex.c:1573: warning[nullPointer]: Possible null pointer dereference: b
# 1571| yy_flush_buffer( b );
# 1572|
# 1573|-> b->yy_input_file = file;
# 1574| b->yy_fill_buffer = 1;
# 1575|
Error: GCC_ANALYZER_WARNING (CWE-401):
dtc-1.7.2/dtc-lexer.lex.c:1745:54: warning[-Wanalyzer-malloc-leak]: leak of ‘yyalloc(64)’
dtc-1.7.2/dtc-lexer.lex.c:1732:21: enter_function: entry to ‘yy_create_buffer’
dtc-1.7.2/dtc-lexer.lex.c:1736:24: call_function: calling ‘yyalloc’ from ‘yy_create_buffer’
dtc-1.7.2/dtc-lexer.lex.c:1736:24: return_function: returning to ‘yy_create_buffer’ from ‘yyalloc’
dtc-1.7.2/dtc-lexer.lex.c:1737:12: branch_false: following ‘false’ branch...
dtc-1.7.2/dtc-lexer.lex.c:1740:2: branch_false: ...to here
dtc-1.7.2/dtc-lexer.lex.c:1745:54: danger: ‘yyalloc(64)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
# 1743| /* yy_ch_buf has to be 2 characters longer than the size given because
# 1744| * we need to put in 2 end-of-buffer characters.
# 1745|-> */
# 1746| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 1747| if ( ! b->yy_ch_buf )
Error: CPPCHECK_WARNING (CWE-476):
dtc-1.7.2/dtc-lexer.lex.c:1786: warning[nullPointer]: Possible null pointer dereference: b
# 1784|
# 1785| yy_flush_buffer( b );
# 1786|->
# 1787| b->yy_input_file = file;
# 1788| b->yy_fill_buffer = 1;
Error: CPPCHECK_WARNING (CWE-476):
dtc-1.7.2/dtc-lexer.lex.c:1787: warning[nullPointer]: Possible null pointer dereference: b
# 1785| yy_flush_buffer( b );
# 1786|
# 1787|-> b->yy_input_file = file;
# 1788| b->yy_fill_buffer = 1;
# 1789|
Error: GCC_ANALYZER_WARNING (CWE-401):
dtc-1.7.2/dtc-lexer.lex.c:2000:26: warning[-Wanalyzer-malloc-leak]: leak of ‘yyalloc(n)’
dtc-1.7.2/dtc-lexer.lex.c:1984:17: enter_function: entry to ‘yy_scan_bytes’
dtc-1.7.2/dtc-lexer.lex.c:1993:24: call_function: calling ‘yyalloc’ from ‘yy_scan_bytes’
dtc-1.7.2/dtc-lexer.lex.c:1993:24: return_function: returning to ‘yy_scan_bytes’ from ‘yyalloc’
dtc-1.7.2/dtc-lexer.lex.c:1994:12: branch_false: following ‘false’ branch...
dtc-1.7.2/dtc-lexer.lex.c:1994:12: branch_false: ...to here
dtc-1.7.2/dtc-lexer.lex.c:2002:6: call_function: calling ‘yy_scan_buffer’ from ‘yy_scan_bytes’
# 1998| for ( i = 0; i < _yybytes_len; ++i )
# 1999| buf[i] = yybytes[i];
# 2000|->
# 2001| buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 2002|
Error: CPPCHECK_WARNING (CWE-457):
dtc-1.7.2/pylibfdt/libfdt_wrap.c:872: warning[uninitvar]: Uninitialized variable: buff
# 870| *r = 0;
# 871| }
# 872|-> return buff;
# 873| }
# 874|
Error: CPPCHECK_WARNING (CWE-476):
dtc-1.7.2/pylibfdt/libfdt_wrap.c:1901: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
# 1899| SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
# 1900| /* the klass element */
# 1901|-> data->klass = obj;
# 1902| SWIG_Py_INCREF(data->klass);
# 1903| /* the newraw method and newargs arguments used to create a new raw instance */
Error: CPPCHECK_WARNING (CWE-476):
dtc-1.7.2/pylibfdt/libfdt_wrap.c:1902: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
# 1900| /* the klass element */
# 1901| data->klass = obj;
# 1902|-> SWIG_Py_INCREF(data->klass);
# 1903| /* the newraw method and newargs arguments used to create a new raw instance */
# 1904| if (PyClass_Check(obj)) {