Task #123066 - added.err

back to task #123066
download
Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c: scope_hint: In function ‘xiconf_add_cfile’
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:512:16: warning[-Wanalyzer-malloc-leak]: leak of ‘xiconf_read(path, 0)’
/usr/include/features.h:540: included_from: Included from here.
/usr/include/sys/types.h:25: included_from: Included from here.
openscap-1.4.5/compat/compat.h:62: included_from: Included from here.
openscap-1.4.5/redhat-linux-build/config.h:144: included_from: Included from here.
openscap-1.4.5/tests/probes/xinetd/test_probe_xinetd.c:3: included_from: Included from here.
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:673:34: note: in expansion of macro ‘tmpbuf_get’
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:673:34: note: in expansion of macro ‘tmpbuf_get’
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:41: included_from: Included from here.
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:892:25: note: in expansion of macro ‘tmpbuf_free’
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:892:25: note: in expansion of macro ‘tmpbuf_free’
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:673:34: note: in expansion of macro ‘tmpbuf_get’
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:673:34: note: in expansion of macro ‘tmpbuf_get’
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:53: included_from: Included from here.
openscap-1.4.5/src/common/debug_priv.h:54:33: note: in expansion of macro ‘__dlprintf_wrapper’
openscap-1.4.5/src/common/debug_priv.h:64:17: note: in expansion of macro ‘oscap_dlprintf’
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:580:9: note: in expansion of macro ‘dD’
#  510|   	}
#  511|   
#  512|-> 	if ((st.st_mode & S_IFMT) != S_IFREG) {
#  513|   		dE("Not a regular file: %s", path);
#  514|   		close (fd);

Error: GCC_ANALYZER_WARNING (CWE-401):
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c: scope_hint: In function ‘xiconf_add_cfile’
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:583:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:673:34: note: in expansion of macro ‘tmpbuf_get’
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:673:34: note: in expansion of macro ‘tmpbuf_get’
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:892:25: note: in expansion of macro ‘tmpbuf_free’
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:892:25: note: in expansion of macro ‘tmpbuf_free’
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:673:34: note: in expansion of macro ‘tmpbuf_get’
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:673:34: note: in expansion of macro ‘tmpbuf_get’
openscap-1.4.5/src/common/debug_priv.h:54:33: note: in expansion of macro ‘__dlprintf_wrapper’
openscap-1.4.5/src/common/debug_priv.h:64:17: note: in expansion of macro ‘oscap_dlprintf’
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:580:9: note: in expansion of macro ‘dD’
#  581|   	xifile = xiconf_read (path, 0);
#  582|   
#  583|-> 	if (xifile == NULL) {
#  584|   		dW("Failed to read file: %s", path);
#  585|   		return (-1);

Error: GCC_ANALYZER_WARNING (CWE-122):
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:41: included_from: Included from here.
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c: scope_hint: In function ‘xiconf_parse_section’
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:959:36: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:673:34: note: in expansion of macro ‘tmpbuf_get’
openscap-1.4.5/src/OVAL/probes/unix/xinetd_probe.c:673:34: note: in expansion of macro ‘tmpbuf_get’
#  957|   	 * at the end are allowed here.
#  958|   	 */
#  959|-> 	while(isspace(xifile->inmem[xifile->inoff]))
#  960|   		++xifile->inoff;
#  961|   	if (xifile->inmem[xifile->inoff] != '{')