Newly introduced defects

List of Defects

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
libXaw-1.0.16-build/libXaw-1.0.16/src/TextPop.c: scope_hint: In function 'InsertFileNamed'
libXaw-1.0.16-build/libXaw-1.0.16/src/TextPop.c:328:70: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(str, "re")'
#  326|   
#  327|       fseek(file, 0L, SEEK_SET);
#  328|->     if (fread(text.ptr, 1, (size_t)text.length, file) != (size_t)text.length)
#  329|   	XtErrorMsg("readError", "insertFileNamed", "XawError",
#  330|   		   "fread returned error", NULL, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
libXaw-1.0.16-build/libXaw-1.0.16/src/TextPop.c:328:70: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(str, "re")'
#  326|   
#  327|       fseek(file, 0L, SEEK_SET);
#  328|->     if (fread(text.ptr, 1, (size_t)text.length, file) != (size_t)text.length)
#  329|   	XtErrorMsg("readError", "insertFileNamed", "XawError",
#  330|   		   "fread returned error", NULL, NULL);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
libXaw-1.0.16-build/libXaw-1.0.16/src/XawIm.c: scope_hint: In function 'SizeNegotiation'
libXaw-1.0.16-build/libXaw-1.0.16/src/XawIm.c:729:44: warning[-Wanalyzer-null-dereference]: dereference of NULL 'st_area_needed'
libXaw-1.0.16-build/libXaw-1.0.16/src/XawIm.c:57: included_from: Included from here.
libXaw-1.0.16-build/libXaw-1.0.16/src/XawIm.c: scope_hint: In function 'SizeNegotiation'
libXaw-1.0.16-build/libXaw-1.0.16/src/XawIm.c:895:5: note: in expansion of macro 'END_IC'
libXaw-1.0.16-build/libXaw-1.0.16/src/XawIm.c:716:5: note: in expansion of macro 'END_IC'
#  727|   	ic_cnt = 0;
#  728|   	if (p->input_style & XIMStatusArea) {
#  729|-> 	    st_area.height = st_area_needed->height;
#  730|   	    st_area.x = 0;
#  731|   	    st_area.y = (short)(height - st_area.height);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
libXaw-1.0.16-build/libXaw-1.0.16/src/XawIm.c:751:44: warning[-Wanalyzer-null-dereference]: dereference of NULL 'pe_area_needed'
libXaw-1.0.16-build/libXaw-1.0.16/src/XawIm.c: scope_hint: In function 'SizeNegotiation'
libXaw-1.0.16-build/libXaw-1.0.16/src/XawIm.c:895:5: note: in expansion of macro 'END_IC'
#  749|   		pe_area.width = (unsigned short)width;
#  750|   	    }
#  751|-> 	    pe_area.height = pe_area_needed->height;
#  752|   	    XFree(pe_area_needed);
#  753|   	    pe_area.y = (short)(height - pe_area.height);

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-216.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namelibXaw-1.0.15-3.fc40
diffbase-store-results-to/tmp/tmp9epc1t0d/libXaw-1.0.15-3.fc40.tar.xz
diffbase-time-created2024-07-03 14:28:38
diffbase-time-finished2024-07-03 14:30:45
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp9epc1t0d/libXaw-1.0.15-3.fc40.tar.xz' '--gcc-analyze' '/tmp/tmp9epc1t0d/libXaw-1.0.15-3.fc40.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-216.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namelibXaw-1.0.16-1.fc41
store-results-to/tmp/tmpcxbi1s1t/libXaw-1.0.16-1.fc41.tar.xz
time-created2024-07-03 14:31:01
time-finished2024-07-03 14:32:43
titleNewly introduced defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpcxbi1s1t/libXaw-1.0.16-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpcxbi1s1t/libXaw-1.0.16-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9