Task #131756 - added.err
back to task #131756download
Error: GCC_ANALYZER_WARNING (CWE-401):
libselinux-3.11/src/label_media.c:140:28: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc((long unsigned int)*data.nspec, 80)’
libselinux-3.11/src/label_media.c:70:12: enter_function: entry to ‘init’
libselinux-3.11/src/label_media.c:100:12: branch_true: following ‘true’ branch (when ‘path’ is NULL)...
libselinux-3.11/src/label_media.c:101:24: branch_true: ...to here
libselinux-3.11/src/label_media.c:102:12: branch_false: following ‘false’ branch...
libselinux-3.11/src/label_media.c:104:9: branch_false: ...to here
libselinux-3.11/src/label_media.c:106:12: branch_false: following ‘false’ branch...
libselinux-3.11/src/label_media.c:108:14: branch_false: ...to here
libselinux-3.11/src/label_media.c:108:12: branch_false: following ‘false’ branch...
libselinux-3.11/src/label_media.c:112:26: branch_false: ...to here
libselinux-3.11/src/label_media.c:123:24: branch_true: following ‘true’ branch (when ‘pass != 2’)...
libselinux-3.11/src/label_media.c:125:17: branch_true: ...to here
libselinux-3.11/src/label_media.c:126:24: branch_true: following ‘true’ branch...
libselinux-3.11/src/label_media.c:127:24: branch_true: ...to here
libselinux-3.11/src/label_media.c:126:24: branch_true: following ‘true’ branch...
libselinux-3.11/src/label_media.c:128:28: branch_true: ...to here
libselinux-3.11/src/label_media.c:128:29: call_function: calling ‘process_line’ from ‘init’
libselinux-3.11/src/label_media.c:128:29: return_function: returning to ‘init’ from ‘process_line’
libselinux-3.11/src/label_media.c:126:24: branch_true: following ‘true’ branch...
libselinux-3.11/src/label_media.c:127:24: branch_true: ...to here
libselinux-3.11/src/label_media.c:126:24: branch_false: following ‘false’ branch...
libselinux-3.11/src/label_media.c:134:20: branch_false: ...to here
libselinux-3.11/src/label_media.c:134:20: branch_true: following ‘true’ branch (when ‘pass == 0’)...
libselinux-3.11/src/label_media.c:135:29: branch_true: ...to here
libselinux-3.11/src/label_media.c:135:28: branch_false: following ‘false’ branch...
libselinux-3.11/src/label_media.c:139:42: branch_false: ...to here
libselinux-3.11/src/label_media.c:139:42: acquire_memory: allocated here
libselinux-3.11/src/label_media.c:140:28: danger: ‘calloc((long unsigned int)*data.nspec, 80)’ leaks here; was allocated at [(31)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/30)
# 138| }
# 139| data->spec_arr = calloc(data->nspec, sizeof(spec_t));
# 140|-> if (data->spec_arr == NULL) {
# 141| status = -1;
# 142| goto finish;
Error: GCC_ANALYZER_WARNING (CWE-401):
libselinux-3.11/src/label_x.c:170:28: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc((long unsigned int)*data.nspec, 80)’
libselinux-3.11/src/label_x.c:100:12: enter_function: entry to ‘init’
libselinux-3.11/src/label_x.c:130:12: branch_true: following ‘true’ branch (when ‘path’ is NULL)...
libselinux-3.11/src/label_x.c:131:24: branch_true: ...to here
libselinux-3.11/src/label_x.c:132:12: branch_false: following ‘false’ branch...
libselinux-3.11/src/label_x.c:134:9: branch_false: ...to here
libselinux-3.11/src/label_x.c:136:12: branch_false: following ‘false’ branch...
libselinux-3.11/src/label_x.c:138:14: branch_false: ...to here
libselinux-3.11/src/label_x.c:138:12: branch_false: following ‘false’ branch...
libselinux-3.11/src/label_x.c:142:26: branch_false: ...to here
libselinux-3.11/src/label_x.c:153:24: branch_true: following ‘true’ branch (when ‘pass != 2’)...
libselinux-3.11/src/label_x.c:155:17: branch_true: ...to here
libselinux-3.11/src/label_x.c:156:24: branch_true: following ‘true’ branch...
libselinux-3.11/src/label_x.c:157:24: branch_true: ...to here
libselinux-3.11/src/label_x.c:156:24: branch_true: following ‘true’ branch...
libselinux-3.11/src/label_x.c:158:28: branch_true: ...to here
libselinux-3.11/src/label_x.c:158:29: call_function: calling ‘process_line’ from ‘init’
libselinux-3.11/src/label_x.c:158:29: return_function: returning to ‘init’ from ‘process_line’
libselinux-3.11/src/label_x.c:156:24: branch_true: following ‘true’ branch...
libselinux-3.11/src/label_x.c:157:24: branch_true: ...to here
libselinux-3.11/src/label_x.c:156:24: branch_false: following ‘false’ branch...
libselinux-3.11/src/label_x.c:164:20: branch_false: ...to here
libselinux-3.11/src/label_x.c:164:20: branch_true: following ‘true’ branch (when ‘pass == 0’)...
libselinux-3.11/src/label_x.c:165:29: branch_true: ...to here
libselinux-3.11/src/label_x.c:165:28: branch_false: following ‘false’ branch...
libselinux-3.11/src/label_x.c:169:42: branch_false: ...to here
libselinux-3.11/src/label_x.c:169:42: acquire_memory: allocated here
libselinux-3.11/src/label_x.c:170:28: danger: ‘calloc((long unsigned int)*data.nspec, 80)’ leaks here; was allocated at [(31)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/30)
# 168| }
# 169| data->spec_arr = calloc(data->nspec, sizeof(spec_t));
# 170|-> if (data->spec_arr == NULL) {
# 171| status = -1;
# 172| goto finish;
Error: GCC_ANALYZER_WARNING (CWE-415):
libselinux-3.11/src/selinux_restorecon.c:230:20: warning[-Wanalyzer-double-free]: double-‘reallocarray’ of ‘exclude_lst’
libselinux-3.11/src/selinux_restorecon.c:1889:6: enter_function: entry to ‘selinux_restorecon_set_exclude_list’
libselinux-3.11/src/selinux_restorecon.c:1894:21: branch_true: following ‘true’ branch...
libselinux-3.11/src/selinux_restorecon.c:1895:21: branch_true: ...to here
libselinux-3.11/src/selinux_restorecon.c:1895:20: branch_true: following ‘true’ branch...
libselinux-3.11/src/selinux_restorecon.c:1895:56: branch_true: ...to here
libselinux-3.11/src/selinux_restorecon.c:1895:21: branch_false: following ‘false’ branch...
libselinux-3.11/src/selinux_restorecon.c:1902:21: branch_false: ...to here
libselinux-3.11/src/selinux_restorecon.c:1902:21: call_function: calling ‘add_exclude’ from ‘selinux_restorecon_set_exclude_list’
libselinux-3.11/src/selinux_restorecon.c:1902:21: return_function: returning to ‘selinux_restorecon_set_exclude_list’ from ‘add_exclude’
libselinux-3.11/src/selinux_restorecon.c:1902:20: branch_true: following ‘true’ branch...
libselinux-3.11/src/selinux_restorecon.c:1903:21: branch_true: ...to here
libselinux-3.11/src/selinux_restorecon.c:1902:21: branch_false: following ‘false’ branch...
libselinux-3.11/src/selinux_restorecon.c:1894:38: branch_false: ...to here
libselinux-3.11/src/selinux_restorecon.c:1894:21: branch_true: following ‘true’ branch...
libselinux-3.11/src/selinux_restorecon.c:1895:21: branch_true: ...to here
libselinux-3.11/src/selinux_restorecon.c:1895:20: branch_true: following ‘true’ branch...
libselinux-3.11/src/selinux_restorecon.c:1895:56: branch_true: ...to here
libselinux-3.11/src/selinux_restorecon.c:1895:21: branch_false: following ‘false’ branch...
libselinux-3.11/src/selinux_restorecon.c:1902:21: branch_false: ...to here
libselinux-3.11/src/selinux_restorecon.c:1902:21: call_function: calling ‘add_exclude’ from ‘selinux_restorecon_set_exclude_list’
# 228| }
# 229|
# 230|-> tmp_list = reallocarray(exclude_lst, exclude_count + 1,
# 231| sizeof(struct edir));
# 232| if (!tmp_list)