Fixed defects

List of Defects

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
gcc-14.0.1-build/gcc-14.0.1-20240411/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed/newlib/doc/makedoc.c: scope_hint: In function ‘newentry’
gcc-14.0.1-build/gcc-14.0.1-20240411/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed/newlib/doc/makedoc.c:1153:15: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘new’
# 1151|   {
# 1152|       dict_type *new = (dict_type *)malloc(sizeof(dict_type));
# 1153|->     new->word = word;
# 1154|       new->next = root;
# 1155|       root = new;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
gcc-14.0.1-build/gcc-14.0.1-20240411/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed/newlib/doc/makedoc.c: scope_hint: In function ‘add_to_definition’
gcc-14.0.1-build/gcc-14.0.1-20240411/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed/newlib/doc/makedoc.c:1170:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
# 1168|       {
# 1169|   	entry->code_length += 2;
# 1170|-> 	entry->code =
# 1171|   	 (stinst_type *) realloc((char *)(entry->code),
# 1172|   			       entry->code_length *sizeof(word_type));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
gcc-14.0.1-build/gcc-14.0.1-20240411/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed/newlib/doc/makedoc.c:1174:34: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*entry.code + (long unsigned int)*entry.code_end * 8’
# 1172|   			       entry->code_length *sizeof(word_type));
# 1173|       }
# 1174|->     entry->code[entry->code_end] = word;
# 1175|       
# 1176|   return     entry->code_end++;  

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-clang18.1.7
diffbase-analyzer-version-cppcheck2.14.2
diffbase-analyzer-version-gcc14.1.1
diffbase-analyzer-version-gcc-analyzer14.1.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-enabled-pluginsclang, cppcheck, gcc, shellcheck
diffbase-exit-code0
diffbase-hostip-172-16-1-251.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namegcc-14.1.1-7.fc41
diffbase-store-results-to/tmp/tmpnnuz9a8a/gcc-14.1.1-7.fc41.tar.xz
diffbase-time-created2024-07-03 22:55:08
diffbase-time-finished2024-07-04 09:17:44
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpnnuz9a8a/gcc-14.1.1-7.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpnnuz9a8a/gcc-14.1.1-7.fc41.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-251.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namegcc-14.0.1-0.15.fc40
store-results-to/tmp/tmpm17bu3dp/gcc-14.0.1-0.15.fc40.tar.xz
time-created2024-07-03 12:41:21
time-finished2024-07-03 22:53:59
titleFixed defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpm17bu3dp/gcc-14.0.1-0.15.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpm17bu3dp/gcc-14.0.1-0.15.fc40.src.rpm'
tool-versioncsmock-3.5.3-1.el9