imlib2-1.12.5-1.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
imlib2-1.12.5/src/bin/imlib2_conv.c:81:9: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
imlib2-1.12.5/src/bin/imlib2_conv.c:65:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
imlib2-1.12.5/src/bin/imlib2_conv.c:68:6: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_conv.c:79:13: acquire_memory: allocated here
imlib2-1.12.5/src/bin/imlib2_conv.c:81:9: throw: if ‘imlib_image_attach_data_value’ throws an exception...
imlib2-1.12.5/src/bin/imlib2_conv.c:81:9: danger: ‘p’ leaks here; was allocated at [(6)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/5)
#   79|           p = strdup(p);
#   80|           Dprintf("%s: Set '%s' = '%s' (%p)\n", __func__, arg, p, p);
#   81|->         imlib_image_attach_data_value(arg, p, 0, data_free_cb);
#   82|           break;
#   83|       }

Error: COMPILER_WARNING (CWE-704): [#def2]
imlib2-1.12.5/src/bin/imlib2_conv.c: scope_hint: In function ‘main’
imlib2-1.12.5/src/bin/imlib2_conv.c:204:9: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  204 |     dot = strrchr(fout, '.');
#      |         ^
#  202|   
#  203|       /* hopefully the last one will be the one we want.. */
#  204|->     dot = strrchr(fout, '.');
#  205|   
#  206|       /* if there's a format, snarf it and set the format. */

Error: COMPILER_WARNING (CWE-704): [#def3]
imlib2-1.12.5/src/bin/imlib2_conv.c:204:9: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  202|   
#  203|       /* hopefully the last one will be the one we want.. */
#  204|->     dot = strrchr(fout, '.');
#  205|   
#  206|       /* if there's a format, snarf it and set the format. */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def4]
imlib2-1.12.5/src/bin/imlib2_load.c:92:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(file, 0)’
imlib2-1.12.5/src/bin/imlib2_load.c:80:8: branch_false: following ‘false’ branch (when ‘ext’ is NULL)...
imlib2-1.12.5/src/bin/imlib2_load.c:85:10: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_load.c:85:10: acquire_resource: opened here
imlib2-1.12.5/src/bin/imlib2_load.c:86:8: branch_false: following ‘false’ branch...
imlib2-1.12.5/src/bin/imlib2_load.c:92:10: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_load.c:92:10: danger: ‘open(file, 0)’ leaks here; was opened at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#   90|       }
#   91|   
#   92|->     im = imlib_load_image_fd(fd, ext);
#   93|   
#   94|       return im;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def5]
imlib2-1.12.5/src/bin/imlib2_show.c:1168:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(xfdfname, "r")’
imlib2-1.12.5/src/bin/imlib2_show.c:94:9: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:94:9: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:142:17: branch_true: following ‘true’ branch (when ‘i < argc’)...
imlib2-1.12.5/src/bin/imlib2_show.c:144:25: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:146:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:148:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:148:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:150:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:150:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:155:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:155:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:157:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:157:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:163:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:163:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:165:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:165:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:167:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:167:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:169:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:169:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:174:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:174:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:197:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:197:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:199:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:199:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:201:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:201:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:203:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:203:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:209:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:209:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:215:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:215:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:220:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:220:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:225:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:225:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:227:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:227:17: branch_true: following ‘true’ branch (when the strings are equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:230:13: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:233:16: branch_false: following ‘false’ branch (when ‘argc <= i’)...
imlib2-1.12.5/src/bin/imlib2_show.c:142:27: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:268:8: branch_true: following ‘true’ branch (when ‘blendtest == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:270:9: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:284:8: branch_false: following ‘false’ branch (when ‘interactive != 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:299:8: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:299:8: branch_true: following ‘true’ branch (when ‘blendtest == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:301:12: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:303:16: branch_false: following ‘false’ branch (when ‘scaleup == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:305:21: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:305:21: branch_false: following ‘false’ branch (when ‘scaleboth == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:308:17: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:311:12: branch_false: following ‘false’ branch (when ‘scale == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:319:9: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:354:8: branch_false: following ‘false’ branch (when ‘pol == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:405:8: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:405:8: branch_false: following ‘false’ branch (when ‘loop == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:589:13: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:589:13: branch_false: following ‘false’ branch (when ‘blendtest == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:605:13: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:605:13: branch_false: following ‘false’ branch (when ‘rottest == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:671:13: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:671:13: branch_false: following ‘false’ branch (when ‘filter == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:756:13: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:756:13: branch_true: following ‘true’ branch (when ‘interactive != 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:788:9: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:790:12: branch_false: following ‘false’ branch (when ‘xfdtest == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:884:12: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:884:12: branch_false: following ‘false’ branch (when ‘fon’ is NULL)...
imlib2-1.12.5/src/bin/imlib2_show.c:884:12: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:904:12: branch_false: following ‘false’ branch (when ‘file’ is NULL)...
imlib2-1.12.5/src/bin/imlib2_show.c:907:21: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:930:24: branch_false: following ‘false’ branch...
imlib2-1.12.5/src/bin/imlib2_show.c:959:20: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:992:16: branch_true: following ‘true’ branch (when ‘first != 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:994:17: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:1129:20: branch_true: following ‘true’ branch...
imlib2-1.12.5/src/bin/imlib2_show.c:1131:26: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:1152:16: branch_true: following ‘true’ branch (when ‘xfdcachetest != 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:1160:22: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:1160:22: acquire_resource: opened here
imlib2-1.12.5/src/bin/imlib2_show.c:1161:20: branch_false: following ‘false’ branch...
imlib2-1.12.5/src/bin/imlib2_show.c:1168:17: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:1168:17: throw: if ‘imlib_context_set_color’ throws an exception...
imlib2-1.12.5/src/bin/imlib2_show.c:1168:17: danger: ‘fopen(xfdfname, "r")’ leaks here; was opened at [(85)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/84)
# 1166|   
# 1167|                   tx = ty = 0;
# 1168|->                 imlib_context_set_color(255, 255, 255, 255);
# 1169|   
# 1170|                   gettimeofday(&timev, NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
imlib2-1.12.5/src/bin/imlib2_show.c:1168:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(xfdfname, "r")’
imlib2-1.12.5/src/bin/imlib2_show.c:94:9: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:94:9: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:142:17: branch_true: following ‘true’ branch (when ‘i < argc’)...
imlib2-1.12.5/src/bin/imlib2_show.c:144:25: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:146:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:148:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:148:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:150:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:150:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:155:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:155:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:157:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:157:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:163:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:163:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:165:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:165:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:167:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:167:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:169:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:169:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:174:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:174:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:197:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:197:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:199:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:199:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:201:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:201:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:203:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:203:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:209:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:209:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:215:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:215:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:220:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:220:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:225:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:225:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:227:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:227:17: branch_true: following ‘true’ branch (when the strings are equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:230:13: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:233:16: branch_false: following ‘false’ branch (when ‘argc <= i’)...
imlib2-1.12.5/src/bin/imlib2_show.c:142:27: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:268:8: branch_true: following ‘true’ branch (when ‘blendtest == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:270:9: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:284:8: branch_false: following ‘false’ branch (when ‘interactive != 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:299:8: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:299:8: branch_true: following ‘true’ branch (when ‘blendtest == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:301:12: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:303:16: branch_false: following ‘false’ branch (when ‘scaleup == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:305:21: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:305:21: branch_false: following ‘false’ branch (when ‘scaleboth == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:308:17: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:311:12: branch_false: following ‘false’ branch (when ‘scale == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:319:9: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:354:8: branch_false: following ‘false’ branch (when ‘pol == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:405:8: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:405:8: branch_false: following ‘false’ branch (when ‘loop == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:589:13: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:589:13: branch_false: following ‘false’ branch (when ‘blendtest == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:605:13: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:605:13: branch_false: following ‘false’ branch (when ‘rottest == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:671:13: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:671:13: branch_false: following ‘false’ branch (when ‘filter == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:756:13: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:756:13: branch_true: following ‘true’ branch (when ‘interactive != 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:788:9: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:790:12: branch_false: following ‘false’ branch (when ‘xfdtest == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:884:12: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:884:12: branch_false: following ‘false’ branch (when ‘fon’ is NULL)...
imlib2-1.12.5/src/bin/imlib2_show.c:884:12: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:904:12: branch_false: following ‘false’ branch (when ‘file’ is NULL)...
imlib2-1.12.5/src/bin/imlib2_show.c:907:21: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:930:24: branch_false: following ‘false’ branch...
imlib2-1.12.5/src/bin/imlib2_show.c:959:20: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:992:16: branch_true: following ‘true’ branch (when ‘first != 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:994:17: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:1129:20: branch_true: following ‘true’ branch...
imlib2-1.12.5/src/bin/imlib2_show.c:1131:26: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:1152:16: branch_true: following ‘true’ branch (when ‘xfdcachetest != 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:1160:22: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:1160:22: acquire_memory: allocated here
imlib2-1.12.5/src/bin/imlib2_show.c:1161:20: branch_false: following ‘false’ branch...
imlib2-1.12.5/src/bin/imlib2_show.c:1168:17: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:1168:17: throw: if ‘imlib_context_set_color’ throws an exception...
imlib2-1.12.5/src/bin/imlib2_show.c:1168:17: danger: ‘fopen(xfdfname, "r")’ leaks here; was allocated at [(85)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/84)
# 1166|   
# 1167|                   tx = ty = 0;
# 1168|->                 imlib_context_set_color(255, 255, 255, 255);
# 1169|   
# 1170|                   gettimeofday(&timev, NULL);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def7]
imlib2-1.12.5/src/bin/imlib2_show.c:1171:29: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(xfdfname, "r")’
imlib2-1.12.5/src/bin/imlib2_show.c:94:9: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:94:9: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:142:17: branch_true: following ‘true’ branch (when ‘i < argc’)...
imlib2-1.12.5/src/bin/imlib2_show.c:144:25: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:146:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:148:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:148:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:150:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:150:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:155:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:155:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:157:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:157:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:163:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:163:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:165:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:165:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:167:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:167:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:169:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:169:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:174:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:174:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:197:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:197:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:199:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:199:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:201:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:201:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:203:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:203:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:209:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:209:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:215:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:215:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:220:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:220:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:225:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:225:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:227:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:227:17: branch_true: following ‘true’ branch (when the strings are equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:230:13: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:233:16: branch_false: following ‘false’ branch (when ‘argc <= i’)...
imlib2-1.12.5/src/bin/imlib2_show.c:142:27: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:268:8: branch_true: following ‘true’ branch (when ‘blendtest == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:270:9: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:284:8: branch_false: following ‘false’ branch (when ‘interactive != 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:299:8: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:299:8: branch_true: following ‘true’ branch (when ‘blendtest == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:301:12: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:303:16: branch_false: following ‘false’ branch (when ‘scaleup == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:305:21: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:305:21: branch_false: following ‘false’ branch (when ‘scaleboth == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:308:17: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:311:12: branch_false: following ‘false’ branch (when ‘scale == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:319:9: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:354:8: branch_false: following ‘false’ branch (when ‘pol == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:405:8: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:405:8: branch_false: following ‘false’ branch (when ‘loop == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:589:13: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:589:13: branch_false: following ‘false’ branch (when ‘blendtest == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:605:13: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:605:13: branch_false: following ‘false’ branch (when ‘rottest == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:671:13: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:671:13: branch_false: following ‘false’ branch (when ‘filter == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:756:13: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:756:13: branch_true: following ‘true’ branch (when ‘interactive != 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:788:9: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:790:12: branch_false: following ‘false’ branch (when ‘xfdtest == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:884:12: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:884:12: branch_false: following ‘false’ branch (when ‘fon’ is NULL)...
imlib2-1.12.5/src/bin/imlib2_show.c:884:12: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:904:12: branch_false: following ‘false’ branch (when ‘file’ is NULL)...
imlib2-1.12.5/src/bin/imlib2_show.c:907:21: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:930:24: branch_false: following ‘false’ branch...
imlib2-1.12.5/src/bin/imlib2_show.c:959:20: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:992:16: branch_true: following ‘true’ branch (when ‘first != 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:994:17: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:1129:20: branch_true: following ‘true’ branch...
imlib2-1.12.5/src/bin/imlib2_show.c:1131:26: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:1152:16: branch_true: following ‘true’ branch (when ‘xfdcachetest != 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:1160:22: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:1160:22: acquire_resource: opened here
imlib2-1.12.5/src/bin/imlib2_show.c:1161:20: branch_false: following ‘false’ branch...
imlib2-1.12.5/src/bin/imlib2_show.c:1168:17: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:1175:24: branch_true: following ‘true’ branch (when ‘l != 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:1177:21: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:1177:21: throw: if ‘fseek’ throws an exception...
imlib2-1.12.5/src/bin/imlib2_show.c:1171:29: danger: ‘fopen(xfdfname, "r")’ leaks here; was opened at [(85)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/84)
# 1169|   
# 1170|                   gettimeofday(&timev, NULL);
# 1171|->                 secs = (int)timev.tv_sec;
# 1172|                   usecs = (int)timev.tv_usec;
# 1173|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
imlib2-1.12.5/src/bin/imlib2_show.c:1171:29: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(xfdfname, "r")’
imlib2-1.12.5/src/bin/imlib2_show.c:94:9: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:94:9: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:142:17: branch_true: following ‘true’ branch (when ‘i < argc’)...
imlib2-1.12.5/src/bin/imlib2_show.c:144:25: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:146:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:148:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:148:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:150:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:150:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:155:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:155:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:157:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:157:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:163:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:163:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:165:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:165:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:167:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:167:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:169:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:169:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:174:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:174:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:197:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:197:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:199:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:199:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:201:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:201:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:203:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:203:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:209:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:209:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:215:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:215:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:220:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:220:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:225:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:225:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:227:19: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:227:17: branch_true: following ‘true’ branch (when the strings are equal)...
imlib2-1.12.5/src/bin/imlib2_show.c:230:13: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:233:16: branch_false: following ‘false’ branch (when ‘argc <= i’)...
imlib2-1.12.5/src/bin/imlib2_show.c:142:27: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:268:8: branch_true: following ‘true’ branch (when ‘blendtest == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:270:9: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:284:8: branch_false: following ‘false’ branch (when ‘interactive != 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:299:8: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:299:8: branch_true: following ‘true’ branch (when ‘blendtest == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:301:12: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:303:16: branch_false: following ‘false’ branch (when ‘scaleup == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:305:21: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:305:21: branch_false: following ‘false’ branch (when ‘scaleboth == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:308:17: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:311:12: branch_false: following ‘false’ branch (when ‘scale == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:319:9: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:354:8: branch_false: following ‘false’ branch (when ‘pol == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:405:8: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:405:8: branch_false: following ‘false’ branch (when ‘loop == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:589:13: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:589:13: branch_false: following ‘false’ branch (when ‘blendtest == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:605:13: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:605:13: branch_false: following ‘false’ branch (when ‘rottest == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:671:13: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:671:13: branch_false: following ‘false’ branch (when ‘filter == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:756:13: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:756:13: branch_true: following ‘true’ branch (when ‘interactive != 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:788:9: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:790:12: branch_false: following ‘false’ branch (when ‘xfdtest == 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:884:12: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:884:12: branch_false: following ‘false’ branch (when ‘fon’ is NULL)...
imlib2-1.12.5/src/bin/imlib2_show.c:884:12: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:904:12: branch_false: following ‘false’ branch (when ‘file’ is NULL)...
imlib2-1.12.5/src/bin/imlib2_show.c:907:21: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:930:24: branch_false: following ‘false’ branch...
imlib2-1.12.5/src/bin/imlib2_show.c:959:20: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:992:16: branch_true: following ‘true’ branch (when ‘first != 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:994:17: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:1129:20: branch_true: following ‘true’ branch...
imlib2-1.12.5/src/bin/imlib2_show.c:1131:26: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:1152:16: branch_true: following ‘true’ branch (when ‘xfdcachetest != 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:1160:22: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:1160:22: acquire_memory: allocated here
imlib2-1.12.5/src/bin/imlib2_show.c:1161:20: branch_false: following ‘false’ branch...
imlib2-1.12.5/src/bin/imlib2_show.c:1168:17: branch_false: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:1175:24: branch_true: following ‘true’ branch (when ‘l != 0’)...
imlib2-1.12.5/src/bin/imlib2_show.c:1177:21: branch_true: ...to here
imlib2-1.12.5/src/bin/imlib2_show.c:1177:21: throw: if ‘fseek’ throws an exception...
imlib2-1.12.5/src/bin/imlib2_show.c:1171:29: danger: ‘fopen(xfdfname, "r")’ leaks here; was allocated at [(85)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/84)
# 1169|   
# 1170|                   gettimeofday(&timev, NULL);
# 1171|->                 secs = (int)timev.tv_sec;
# 1172|                   usecs = (int)timev.tv_usec;
# 1173|   

Error: CPPCHECK_WARNING (CWE-476): [#def9]
imlib2-1.12.5/src/lib/api.c:204: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: item
#  202|   
#  203|       item = malloc(sizeof(ImlibContextItem));
#  204|->     item->context = ctx;
#  205|       item->below = contexts;
#  206|       contexts = item;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def10]
imlib2-1.12.5/src/lib/api.c:204:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'item'
imlib2-1.12.5/src/lib/api.c:200:5: branch_false: following 'false' branch (when 'context' is non-NULL)...
imlib2-1.12.5/src/lib/api.c:201:5: branch_false: ...to here
imlib2-1.12.5/src/lib/api.c:203:12: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/api.c:204:5: danger: 'item' could be NULL: unchecked value from [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  202|   
#  203|       item = malloc(sizeof(ImlibContextItem));
#  204|->     item->context = ctx;
#  205|       item->below = contexts;
#  206|       contexts = item;

Error: CPPCHECK_WARNING (CWE-476): [#def11]
imlib2-1.12.5/src/lib/api.c:205: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: item
#  203|       item = malloc(sizeof(ImlibContextItem));
#  204|       item->context = ctx;
#  205|->     item->below = contexts;
#  206|       contexts = item;
#  207|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
imlib2-1.12.5/src/lib/api.c:617:14: warning[-Wanalyzer-malloc-leak]: leak of 'ila.fp'
imlib2-1.12.5/src/lib/api.c:612:5: branch_false: following 'false' branch (when 'file' is non-NULL)...
imlib2-1.12.5/src/lib/api.c:614:14: branch_false: ...to here
imlib2-1.12.5/src/lib/api.c:614:14: acquire_memory: allocated here
imlib2-1.12.5/src/lib/api.c:615:8: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/api.c:617:14: branch_true: ...to here
imlib2-1.12.5/src/lib/api.c:617:14: throw: if '__imlib_LoadImage' throws an exception...
imlib2-1.12.5/src/lib/api.c:617:14: danger: 'ila.fp' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  615|       if (ila.fp)
#  616|       {
#  617|->         im = __imlib_LoadImage(file, &ila);
#  618|           ctx->error = ila.err;
#  619|           fclose(ila.fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
imlib2-1.12.5/src/lib/api.c:1898:18: warning[-Wanalyzer-malloc-leak]: leak of 'fp'
imlib2-1.12.5/src/lib/api.c:1939:1: enter_function: entry to 'imlib_save_image_fd'
imlib2-1.12.5/src/lib/api.c:1943:10: acquire_memory: allocated here
imlib2-1.12.5/src/lib/api.c:1944:8: branch_false: following 'false' branch (when 'fp' is non-NULL)...
imlib2-1.12.5/src/lib/api.c:1951:5: branch_false: ...to here
imlib2-1.12.5/src/lib/api.c:1951:5: call_function: calling '_imlib_save_image' from 'imlib_save_image_fd'
# 1896|       CAST_IMAGE(im, ctx->image);
# 1897|   
# 1898|->     ctx->error = __imlib_LoadImageData(im);
# 1899|       if (ctx->error)
# 1900|           return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
imlib2-1.12.5/src/lib/api.c:1903:5: warning[-Wanalyzer-malloc-leak]: leak of 'fp'
imlib2-1.12.5/src/lib/api.c:1939:1: enter_function: entry to 'imlib_save_image_fd'
imlib2-1.12.5/src/lib/api.c:1943:10: acquire_memory: allocated here
imlib2-1.12.5/src/lib/api.c:1944:8: branch_false: following 'false' branch (when 'fp' is non-NULL)...
imlib2-1.12.5/src/lib/api.c:1951:5: branch_false: ...to here
imlib2-1.12.5/src/lib/api.c:1951:5: call_function: calling '_imlib_save_image' from 'imlib_save_image_fd'
# 1901|   
# 1902|       ila.fp = fp;
# 1903|->     __imlib_SaveImage(im, file, &ila);
# 1904|       ctx->error = ila.err;
# 1905|   }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def15]
imlib2-1.12.5/src/lib/api_filter.c:134:5: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
imlib2-1.12.5/src/lib/api_filter.c:130:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/api_filter.c:132:5: branch_false: ...to here
imlib2-1.12.5/src/lib/api_filter.c:133:5: acquire_resource: 'va_start' called here
imlib2-1.12.5/src/lib/api_filter.c:134:5: throw: if '__imlib_script_parse' throws an exception...
imlib2-1.12.5/src/lib/api_filter.c:134:5: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  132|       __imlib_DirtyImage(im);
#  133|       va_start(param_list, script);
#  134|->     __imlib_script_parse(im, script, param_list);
#  135|       va_end(param_list);
#  136|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
imlib2-1.12.5/src/lib/blend.c:1949:13: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
imlib2-1.12.5/src/lib/blend.c:1815:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/blend.c:1820:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/blend.c:1823:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/blend.c:1861:9: branch_false: ...to here
imlib2-1.12.5/src/lib/blend.c:1870:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/blend.c:1872:12: branch_false: ...to here
imlib2-1.12.5/src/lib/blend.c:1880:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/blend.c:1890:9: branch_false: ...to here
imlib2-1.12.5/src/lib/blend.c:1891:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/blend.c:1893:12: branch_false: ...to here
imlib2-1.12.5/src/lib/blend.c:1919:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/blend.c:1923:22: branch_false: ...to here
imlib2-1.12.5/src/lib/blend.c:1923:15: acquire_memory: allocated here
imlib2-1.12.5/src/lib/blend.c:1924:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
imlib2-1.12.5/src/lib/blend.c:1932:14: branch_false: ...to here
imlib2-1.12.5/src/lib/blend.c:1942:21: branch_true: following 'true' branch (when 'dhabs > y')...
imlib2-1.12.5/src/lib/blend.c:1945:16: branch_true: ...to here
imlib2-1.12.5/src/lib/blend.c:1949:13: throw: if '__imlib_Scale' throws an exception...
imlib2-1.12.5/src/lib/blend.c:1949:13: danger: 'buf' leaks here; was allocated at [(15)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/14)
# 1947|   
# 1948|               /* scale the imagedata for this LINESIZE lines chunk of image */
# 1949|->             __imlib_Scale(scaleinfo, aa, im_src->has_alpha,
# 1950|                             im_src->data, buf, dxx, dyy + y,
# 1951|                             0, 0, dwabs, hh, dwabs, im_src->w);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
imlib2-1.12.5/src/lib/draw_polygon.c:730:5: warning[-Wanalyzer-malloc-leak]: leak of 'edge'
imlib2-1.12.5/src/lib/draw_polygon.c:1043:1: enter_function: entry to '__imlib_Polygon_DrawToImage'
imlib2-1.12.5/src/lib/draw_polygon.c:1047:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1051:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1058:8: branch_false: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1058:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1067:8: branch_false: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1077:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1080:8: branch_false: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1083:8: branch_true: following 'true' branch (when 'anti_alias != 0')...
imlib2-1.12.5/src/lib/draw_polygon.c:1084:9: branch_true: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1084:9: call_function: calling '__imlib_Polygon_DrawToData_AA' from '__imlib_Polygon_DrawToImage'
#  728|       uint8_t        *s0, *s1, *ps;
#  729|   
#  730|->     INIT_POLY();
#  731|   
#  732|       yy = y << 16;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
imlib2-1.12.5/src/lib/draw_polygon.c:730:5: warning[-Wanalyzer-malloc-leak]: leak of 's0'
imlib2-1.12.5/src/lib/draw_polygon.c:1043:1: enter_function: entry to '__imlib_Polygon_DrawToImage'
imlib2-1.12.5/src/lib/draw_polygon.c:1047:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1051:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1058:8: branch_false: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1058:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1067:8: branch_false: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1077:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1080:8: branch_false: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1083:8: branch_true: following 'true' branch (when 'anti_alias != 0')...
imlib2-1.12.5/src/lib/draw_polygon.c:1084:9: branch_true: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1084:9: call_function: calling '__imlib_Polygon_DrawToData_AA' from '__imlib_Polygon_DrawToImage'
#  728|       uint8_t        *s0, *s1, *ps;
#  729|   
#  730|->     INIT_POLY();
#  731|   
#  732|       yy = y << 16;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
imlib2-1.12.5/src/lib/draw_polygon.c:730:5: warning[-Wanalyzer-malloc-leak]: leak of 's1'
imlib2-1.12.5/src/lib/draw_polygon.c:1043:1: enter_function: entry to '__imlib_Polygon_DrawToImage'
imlib2-1.12.5/src/lib/draw_polygon.c:1047:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1051:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1058:8: branch_false: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1058:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1067:8: branch_false: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1077:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1080:8: branch_false: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1083:8: branch_true: following 'true' branch (when 'anti_alias != 0')...
imlib2-1.12.5/src/lib/draw_polygon.c:1084:9: branch_true: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1084:9: call_function: calling '__imlib_Polygon_DrawToData_AA' from '__imlib_Polygon_DrawToImage'
#  728|       uint8_t        *s0, *s1, *ps;
#  729|   
#  730|->     INIT_POLY();
#  731|   
#  732|       yy = y << 16;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
imlib2-1.12.5/src/lib/draw_polygon.c:730:5: warning[-Wanalyzer-malloc-leak]: leak of 'ysort'
imlib2-1.12.5/src/lib/draw_polygon.c:1043:1: enter_function: entry to '__imlib_Polygon_DrawToImage'
imlib2-1.12.5/src/lib/draw_polygon.c:1047:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1051:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1058:8: branch_false: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1058:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1067:8: branch_false: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1077:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1080:8: branch_false: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1083:8: branch_true: following 'true' branch (when 'anti_alias != 0')...
imlib2-1.12.5/src/lib/draw_polygon.c:1084:9: branch_true: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1084:9: call_function: calling '__imlib_Polygon_DrawToData_AA' from '__imlib_Polygon_DrawToImage'
#  728|       uint8_t        *s0, *s1, *ps;
#  729|   
#  730|->     INIT_POLY();
#  731|   
#  732|       yy = y << 16;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
imlib2-1.12.5/src/lib/draw_polygon.c:772:9: warning[-Wanalyzer-malloc-leak]: leak of 'edge'
imlib2-1.12.5/src/lib/draw_polygon.c:1043:1: enter_function: entry to '__imlib_Polygon_DrawToImage'
imlib2-1.12.5/src/lib/draw_polygon.c:1047:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1051:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1058:8: branch_false: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1058:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1067:8: branch_false: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1077:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1080:8: branch_false: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1083:8: branch_true: following 'true' branch (when 'anti_alias != 0')...
imlib2-1.12.5/src/lib/draw_polygon.c:1084:9: branch_true: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1084:9: call_function: calling '__imlib_Polygon_DrawToData_AA' from '__imlib_Polygon_DrawToImage'
#  770|   
#  771|           /* not really needed, but... */
#  772|->         qsort(edge, nactive_edges, sizeof(PolyEdge), poly_edge_sorter);
#  773|   
#  774|           /* clear alpha buffer */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: warning[-Wanalyzer-malloc-leak]: leak of 'edge'
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: acquire_memory: allocated here
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: branch_true: following 'true' branch (when 'k < nvertices')...
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: branch_true: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: throw: if 'qsort' throws an exception...
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: danger: 'edge' leaks here; was allocated at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
# 1113|       uint8_t        *s0, *s1, *ps;
# 1114|   
# 1115|->     INIT_POLY();
# 1116|   
# 1117|       while (y <= by)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: warning[-Wanalyzer-malloc-leak]: leak of 's0'
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: acquire_memory: allocated here
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: branch_true: following 'true' branch (when 'k < nvertices')...
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: branch_true: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: throw: if 'qsort' throws an exception...
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: danger: 's0' leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
# 1113|       uint8_t        *s0, *s1, *ps;
# 1114|   
# 1115|->     INIT_POLY();
# 1116|   
# 1117|       while (y <= by)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: warning[-Wanalyzer-malloc-leak]: leak of 's1'
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: acquire_memory: allocated here
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: branch_false: following 'false' branch (when 's1' is non-NULL)...
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: branch_false: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: branch_true: following 'true' branch (when 'k < nvertices')...
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: branch_true: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: throw: if 'qsort' throws an exception...
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: danger: 's1' leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
# 1113|       uint8_t        *s0, *s1, *ps;
# 1114|   
# 1115|->     INIT_POLY();
# 1116|   
# 1117|       while (y <= by)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: warning[-Wanalyzer-malloc-leak]: leak of 'ysort'
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: acquire_memory: allocated here
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: branch_true: following 'true' branch (when 'k < nvertices')...
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: branch_true: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: throw: if 'qsort' throws an exception...
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: danger: 'ysort' leaks here; was allocated at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
# 1113|       uint8_t        *s0, *s1, *ps;
# 1114|   
# 1115|->     INIT_POLY();
# 1116|   
# 1117|       while (y <= by)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
imlib2-1.12.5/src/lib/draw_polygon.c:1148:9: warning[-Wanalyzer-malloc-leak]: leak of 'edge'
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: acquire_memory: allocated here
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: branch_true: following 'true' branch (when 'k < nvertices')...
imlib2-1.12.5/src/lib/draw_polygon.c:1115:5: branch_true: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1117:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1117:12: branch_true: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1121:16: branch_true: following 'true' branch (when 'k < nvertices')...
imlib2-1.12.5/src/lib/draw_polygon.c:1121:36: branch_true: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1121:16: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1148:9: branch_false: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1148:9: throw: if 'qsort' throws an exception...
imlib2-1.12.5/src/lib/draw_polygon.c:1148:9: danger: 'edge' leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
# 1146|           }
# 1147|   
# 1148|->         qsort(edge, nactive_edges, sizeof(PolyEdge), poly_edge_sorter);
# 1149|   
# 1150|           /* clear alpha buffer */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: warning[-Wanalyzer-malloc-leak]: leak of 'edge'
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: acquire_memory: allocated here
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: branch_true: following 'true' branch (when 'k < nvertices')...
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: branch_true: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: throw: if 'qsort' throws an exception...
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: danger: 'edge' leaks here; was allocated at [(3)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/2)
# 1429|       uint8_t        *s0, *s1, *ps;
# 1430|   
# 1431|->     INIT_POLY();
# 1432|   
# 1433|       yy = y << 16;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: warning[-Wanalyzer-malloc-leak]: leak of 's0'
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: acquire_memory: allocated here
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: branch_true: following 'true' branch (when 'k < nvertices')...
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: branch_true: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: throw: if 'qsort' throws an exception...
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: danger: 's0' leaks here; was allocated at [(3)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/2)
# 1429|       uint8_t        *s0, *s1, *ps;
# 1430|   
# 1431|->     INIT_POLY();
# 1432|   
# 1433|       yy = y << 16;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: warning[-Wanalyzer-malloc-leak]: leak of 's1'
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: acquire_memory: allocated here
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: branch_false: following 'false' branch (when 's1' is non-NULL)...
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: branch_false: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: branch_true: following 'true' branch (when 'k < nvertices')...
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: branch_true: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: throw: if 'qsort' throws an exception...
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: danger: 's1' leaks here; was allocated at [(3)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/2)
# 1429|       uint8_t        *s0, *s1, *ps;
# 1430|   
# 1431|->     INIT_POLY();
# 1432|   
# 1433|       yy = y << 16;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: warning[-Wanalyzer-malloc-leak]: leak of 'ysort'
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: acquire_memory: allocated here
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: branch_true: following 'true' branch (when 'k < nvertices')...
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: branch_true: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: throw: if 'qsort' throws an exception...
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: danger: 'ysort' leaks here; was allocated at [(3)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/2)
# 1429|       uint8_t        *s0, *s1, *ps;
# 1430|   
# 1431|->     INIT_POLY();
# 1432|   
# 1433|       yy = y << 16;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
imlib2-1.12.5/src/lib/draw_polygon.c:1468:9: warning[-Wanalyzer-malloc-leak]: leak of 'edge'
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: acquire_memory: allocated here
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: branch_true: following 'true' branch (when 'k < nvertices')...
imlib2-1.12.5/src/lib/draw_polygon.c:1431:5: branch_true: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1437:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1437:12: branch_true: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1441:16: branch_true: following 'true' branch (when 'k < nvertices')...
imlib2-1.12.5/src/lib/draw_polygon.c:1441:36: branch_true: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1441:16: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/draw_polygon.c:1468:9: branch_false: ...to here
imlib2-1.12.5/src/lib/draw_polygon.c:1468:9: throw: if 'qsort' throws an exception...
imlib2-1.12.5/src/lib/draw_polygon.c:1468:9: danger: 'edge' leaks here; was allocated at [(3)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/2)
# 1466|           }
# 1467|   
# 1468|->         qsort(edge, nactive_edges, sizeof(PolyEdge), poly_edge_sorter);
# 1469|   
# 1470|           /* clear alpha buffer */

Error: CPPCHECK_WARNING (CWE-476): [#def32]
imlib2-1.12.5/src/lib/dynamic_filters.c:35: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ptr
#   33|       MALLOCSHOW;
#   34|       ptr = malloc(sizeof(ImlibExternalFilter));
#   35|->     ptr->filename = strdup(file);
#   36|       ptr->handle = dlopen(file, RTLD_NOW | RTLD_LOCAL);
#   37|       if (!ptr->handle)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def33]
imlib2-1.12.5/src/lib/dynamic_filters.c:35:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'ptr'
imlib2-1.12.5/src/lib/dynamic_filters.c:34:11: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/dynamic_filters.c:35:5: danger: 'ptr' could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#   33|       MALLOCSHOW;
#   34|       ptr = malloc(sizeof(ImlibExternalFilter));
#   35|->     ptr->filename = strdup(file);
#   36|       ptr->handle = dlopen(file, RTLD_NOW | RTLD_LOCAL);
#   37|       if (!ptr->handle)

Error: CPPCHECK_WARNING (CWE-476): [#def34]
imlib2-1.12.5/src/lib/dynamic_filters.c:36: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ptr
#   34|       ptr = malloc(sizeof(ImlibExternalFilter));
#   35|       ptr->filename = strdup(file);
#   36|->     ptr->handle = dlopen(file, RTLD_NOW | RTLD_LOCAL);
#   37|       if (!ptr->handle)
#   38|       {

Error: CPPCHECK_WARNING (CWE-476): [#def35]
imlib2-1.12.5/src/lib/dynamic_filters.c:37: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ptr
#   35|       ptr->filename = strdup(file);
#   36|       ptr->handle = dlopen(file, RTLD_NOW | RTLD_LOCAL);
#   37|->     if (!ptr->handle)
#   38|       {
#   39|           FREESHOW;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
imlib2-1.12.5/src/lib/dynamic_filters.c:58:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
imlib2-1.12.5/src/lib/dynamic_filters.c:35:21: acquire_memory: allocated here
imlib2-1.12.5/src/lib/dynamic_filters.c:37:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/dynamic_filters.c:45:24: branch_false: ...to here
imlib2-1.12.5/src/lib/dynamic_filters.c:48:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/dynamic_filters.c:58:5: throw: if the called function throws an exception...
imlib2-1.12.5/src/lib/dynamic_filters.c:58:5: danger: '<unknown>' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#   56|       }
#   57|       info = malloc(sizeof(ImlibFilterInfo));
#   58|->     ptr->init_filter(info);
#   59|       ptr->num_filters = info->num_filters;
#   60|       ptr->filters = info->filters;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
imlib2-1.12.5/src/lib/dynamic_filters.c:58:5: warning[-Wanalyzer-malloc-leak]: leak of 'info'
imlib2-1.12.5/src/lib/dynamic_filters.c:37:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/dynamic_filters.c:45:24: branch_false: ...to here
imlib2-1.12.5/src/lib/dynamic_filters.c:48:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/dynamic_filters.c:57:12: acquire_memory: allocated here
imlib2-1.12.5/src/lib/dynamic_filters.c:58:5: throw: if the called function throws an exception...
imlib2-1.12.5/src/lib/dynamic_filters.c:58:5: danger: 'info' leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#   56|       }
#   57|       info = malloc(sizeof(ImlibFilterInfo));
#   58|->     ptr->init_filter(info);
#   59|       ptr->num_filters = info->num_filters;
#   60|       ptr->filters = info->filters;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
imlib2-1.12.5/src/lib/dynamic_filters.c:58:5: warning[-Wanalyzer-malloc-leak]: leak of 'ptr'
imlib2-1.12.5/src/lib/dynamic_filters.c:34:11: acquire_memory: allocated here
imlib2-1.12.5/src/lib/dynamic_filters.c:37:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/dynamic_filters.c:45:24: branch_false: ...to here
imlib2-1.12.5/src/lib/dynamic_filters.c:48:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/dynamic_filters.c:58:5: throw: if the called function throws an exception...
imlib2-1.12.5/src/lib/dynamic_filters.c:58:5: danger: 'ptr' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   56|       }
#   57|       info = malloc(sizeof(ImlibFilterInfo));
#   58|->     ptr->init_filter(info);
#   59|       ptr->num_filters = info->num_filters;
#   60|       ptr->filters = info->filters;

Error: CPPCHECK_WARNING (CWE-476): [#def39]
imlib2-1.12.5/src/lib/dynamic_filters.c:88: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: filters
#   86|           MALLOCSHOW;
#   87|           filters = malloc(sizeof(ImlibExternalFilter));
#   88|->         filters->filename = (char *)"";
#   89|           filters->next = NULL;
#   90|           ptr = filters;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def40]
imlib2-1.12.5/src/lib/dynamic_filters.c:88:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'filters'
imlib2-1.12.5/src/lib/dynamic_filters.c:84:8: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/dynamic_filters.c:87:19: branch_true: ...to here
imlib2-1.12.5/src/lib/dynamic_filters.c:87:19: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/dynamic_filters.c:88:9: danger: 'malloc(88)' could be NULL: unchecked value from [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#   86|           MALLOCSHOW;
#   87|           filters = malloc(sizeof(ImlibExternalFilter));
#   88|->         filters->filename = (char *)"";
#   89|           filters->next = NULL;
#   90|           ptr = filters;

Error: CPPCHECK_WARNING (CWE-476): [#def41]
imlib2-1.12.5/src/lib/dynamic_filters.c:89: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: filters
#   87|           filters = malloc(sizeof(ImlibExternalFilter));
#   88|           filters->filename = (char *)"";
#   89|->         filters->next = NULL;
#   90|           ptr = filters;
#   91|   #ifdef FDEBUG

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
imlib2-1.12.5/src/lib/file.c:189:22: warning[-Wanalyzer-malloc-leak]: leak of 'opendir(dir)'
imlib2-1.12.5/src/lib/file.c:181:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/file.c:184:12: acquire_memory: allocated here
imlib2-1.12.5/src/lib/file.c:185:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/file.c:185:8: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:189:22: throw: if 'readdir' throws an exception...
imlib2-1.12.5/src/lib/file.c:189:22: danger: 'opendir(dir)' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  187|   
#  188|       /* count # of entries in dir (worst case) */
#  189|->     for (dirlen = 0; readdir(dirp) != NULL; dirlen++)
#  190|           ;
#  191|       if (!dirlen)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
imlib2-1.12.5/src/lib/file.c:207:14: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
imlib2-1.12.5/src/lib/file.c:181:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/file.c:185:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/file.c:185:8: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:191:8: branch_false: following 'false' branch (when 'dirlen != 0')...
imlib2-1.12.5/src/lib/file.c:197:13: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:198:8: branch_false: following 'false' branch (when 'names' is non-NULL)...
imlib2-1.12.5/src/lib/file.c:204:5: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:205:17: branch_true: following 'true' branch (when 'i < dirlen')...
imlib2-1.12.5/src/lib/file.c:207:14: branch_true: ...to here
imlib2-1.12.5/src/lib/file.c:208:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/file.c:211:21: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:213:24: acquire_memory: allocated here
imlib2-1.12.5/src/lib/file.c:205:17: branch_true: following 'true' branch (when 'i < dirlen')...
imlib2-1.12.5/src/lib/file.c:207:14: branch_true: ...to here
imlib2-1.12.5/src/lib/file.c:207:14: throw: if 'readdir' throws an exception...
imlib2-1.12.5/src/lib/file.c:207:14: danger: '<unknown>' leaks here; was allocated at [(13)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/12)
#  205|       for (i = 0; i < dirlen;)
#  206|       {
#  207|->         dp = readdir(dirp);
#  208|           if (!dp)
#  209|               break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
imlib2-1.12.5/src/lib/file.c:207:14: warning[-Wanalyzer-malloc-leak]: leak of 'names'
imlib2-1.12.5/src/lib/file.c:181:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/file.c:185:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/file.c:185:8: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:191:8: branch_false: following 'false' branch (when 'dirlen != 0')...
imlib2-1.12.5/src/lib/file.c:197:13: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:197:13: acquire_memory: allocated here
imlib2-1.12.5/src/lib/file.c:198:8: branch_false: following 'false' branch (when 'names' is non-NULL)...
imlib2-1.12.5/src/lib/file.c:204:5: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:205:17: branch_true: following 'true' branch (when 'i < dirlen')...
imlib2-1.12.5/src/lib/file.c:207:14: branch_true: ...to here
imlib2-1.12.5/src/lib/file.c:207:14: throw: if 'readdir' throws an exception...
imlib2-1.12.5/src/lib/file.c:207:14: danger: 'names' leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  205|       for (i = 0; i < dirlen;)
#  206|       {
#  207|->         dp = readdir(dirp);
#  208|           if (!dp)
#  209|               break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
imlib2-1.12.5/src/lib/file.c:217:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
imlib2-1.12.5/src/lib/file.c:181:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/file.c:185:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/file.c:185:8: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:191:8: branch_false: following 'false' branch (when 'dirlen != 0')...
imlib2-1.12.5/src/lib/file.c:197:13: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:198:8: branch_false: following 'false' branch (when 'names' is non-NULL)...
imlib2-1.12.5/src/lib/file.c:204:5: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:205:17: branch_true: following 'true' branch (when 'i < dirlen')...
imlib2-1.12.5/src/lib/file.c:207:14: branch_true: ...to here
imlib2-1.12.5/src/lib/file.c:208:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/file.c:211:21: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:213:24: acquire_memory: allocated here
imlib2-1.12.5/src/lib/file.c:217:5: throw: if 'closedir' throws an exception...
imlib2-1.12.5/src/lib/file.c:217:5: danger: '<unknown>' leaks here; was allocated at [(13)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/12)
#  215|           }
#  216|       }
#  217|->     closedir(dirp);
#  218|   
#  219|       if (i < dirlen)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
imlib2-1.12.5/src/lib/file.c:217:5: warning[-Wanalyzer-malloc-leak]: leak of 'names'
imlib2-1.12.5/src/lib/file.c:181:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/file.c:185:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/file.c:185:8: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:191:8: branch_false: following 'false' branch (when 'dirlen != 0')...
imlib2-1.12.5/src/lib/file.c:197:13: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:197:13: acquire_memory: allocated here
imlib2-1.12.5/src/lib/file.c:198:8: branch_false: following 'false' branch (when 'names' is non-NULL)...
imlib2-1.12.5/src/lib/file.c:204:5: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:217:5: throw: if 'closedir' throws an exception...
imlib2-1.12.5/src/lib/file.c:217:5: danger: 'names' leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  215|           }
#  216|       }
#  217|->     closedir(dirp);
#  218|   
#  219|       if (i < dirlen)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def47]
imlib2-1.12.5/src/lib/file.c:229:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL '*<unknown>' where non-null expected
imlib2-1.12.5/src/lib/file.c:181:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/file.c:185:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/file.c:185:8: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:191:8: branch_false: following 'false' branch (when 'dirlen != 0')...
imlib2-1.12.5/src/lib/file.c:197:13: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:198:8: branch_false: following 'false' branch (when 'names' is non-NULL)...
imlib2-1.12.5/src/lib/file.c:204:5: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:205:17: branch_true: following 'true' branch (when 'i < dirlen')...
imlib2-1.12.5/src/lib/file.c:207:14: branch_true: ...to here
imlib2-1.12.5/src/lib/file.c:208:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/file.c:211:21: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:213:24: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/file.c:205:17: branch_true: following 'true' branch (when 'i < dirlen')...
imlib2-1.12.5/src/lib/file.c:207:14: branch_true: ...to here
imlib2-1.12.5/src/lib/file.c:208:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/file.c:211:21: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:224:12: branch_true: following 'true' branch (when 'done == 0')...
imlib2-1.12.5/src/lib/file.c:224:12: branch_true: ...to here
imlib2-1.12.5/src/lib/file.c:229:17: danger: argument 1 ('*<unknown>') from [(13)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/12) could be NULL where non-null expected
#  227|           for (i = 0; i < dirlen - 1; i++)
#  228|           {
#  229|->             if (strcmp(names[i], names[i + 1]) > 0)
#  230|               {
#  231|                   char           *tmp;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def48]
imlib2-1.12.5/src/lib/file.c:229:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*<unknown>'
imlib2-1.12.5/src/lib/file.c:181:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/file.c:185:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/file.c:185:8: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:191:8: branch_false: following 'false' branch (when 'dirlen != 0')...
imlib2-1.12.5/src/lib/file.c:197:13: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:198:8: branch_false: following 'false' branch (when 'names' is non-NULL)...
imlib2-1.12.5/src/lib/file.c:204:5: branch_false: ...to here
imlib2-1.12.5/src/lib/file.c:224:12: branch_true: following 'true' branch (when 'done == 0')...
imlib2-1.12.5/src/lib/file.c:224:12: branch_true: ...to here
imlib2-1.12.5/src/lib/file.c:229:17: danger: use of uninitialized value '*<unknown>' here
#  227|           for (i = 0; i < dirlen - 1; i++)
#  228|           {
#  229|->             if (strcmp(names[i], names[i + 1]) > 0)
#  230|               {
#  231|                   char           *tmp;

Error: CPPCHECK_WARNING (CWE-476): [#def49]
imlib2-1.12.5/src/lib/filter.c:17: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   15|       if (size > 0)
#   16|       {
#   17|->         fil->alpha.pixels = malloc(size * sizeof(ImlibFilterPixel));
#   18|           fil->red.pixels = malloc(size * sizeof(ImlibFilterPixel));
#   19|           fil->green.pixels = malloc(size * sizeof(ImlibFilterPixel));

Error: CPPCHECK_WARNING (CWE-476): [#def50]
imlib2-1.12.5/src/lib/filter.c:18: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   16|       {
#   17|           fil->alpha.pixels = malloc(size * sizeof(ImlibFilterPixel));
#   18|->         fil->red.pixels = malloc(size * sizeof(ImlibFilterPixel));
#   19|           fil->green.pixels = malloc(size * sizeof(ImlibFilterPixel));
#   20|           fil->blue.pixels = malloc(size * sizeof(ImlibFilterPixel));

Error: CPPCHECK_WARNING (CWE-476): [#def51]
imlib2-1.12.5/src/lib/filter.c:19: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   17|           fil->alpha.pixels = malloc(size * sizeof(ImlibFilterPixel));
#   18|           fil->red.pixels = malloc(size * sizeof(ImlibFilterPixel));
#   19|->         fil->green.pixels = malloc(size * sizeof(ImlibFilterPixel));
#   20|           fil->blue.pixels = malloc(size * sizeof(ImlibFilterPixel));
#   21|           fil->alpha.size = size;

Error: CPPCHECK_WARNING (CWE-476): [#def52]
imlib2-1.12.5/src/lib/filter.c:20: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   18|           fil->red.pixels = malloc(size * sizeof(ImlibFilterPixel));
#   19|           fil->green.pixels = malloc(size * sizeof(ImlibFilterPixel));
#   20|->         fil->blue.pixels = malloc(size * sizeof(ImlibFilterPixel));
#   21|           fil->alpha.size = size;
#   22|           fil->red.size = size;

Error: CPPCHECK_WARNING (CWE-476): [#def53]
imlib2-1.12.5/src/lib/filter.c:21: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   19|           fil->green.pixels = malloc(size * sizeof(ImlibFilterPixel));
#   20|           fil->blue.pixels = malloc(size * sizeof(ImlibFilterPixel));
#   21|->         fil->alpha.size = size;
#   22|           fil->red.size = size;
#   23|           fil->green.size = size;

Error: CPPCHECK_WARNING (CWE-476): [#def54]
imlib2-1.12.5/src/lib/filter.c:22: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   20|           fil->blue.pixels = malloc(size * sizeof(ImlibFilterPixel));
#   21|           fil->alpha.size = size;
#   22|->         fil->red.size = size;
#   23|           fil->green.size = size;
#   24|           fil->blue.size = size;

Error: CPPCHECK_WARNING (CWE-476): [#def55]
imlib2-1.12.5/src/lib/filter.c:23: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   21|           fil->alpha.size = size;
#   22|           fil->red.size = size;
#   23|->         fil->green.size = size;
#   24|           fil->blue.size = size;
#   25|       }

Error: CPPCHECK_WARNING (CWE-476): [#def56]
imlib2-1.12.5/src/lib/filter.c:24: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   22|           fil->red.size = size;
#   23|           fil->green.size = size;
#   24|->         fil->blue.size = size;
#   25|       }
#   26|       else

Error: CPPCHECK_WARNING (CWE-476): [#def57]
imlib2-1.12.5/src/lib/filter.c:28: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   26|       else
#   27|       {
#   28|->         fil->alpha.pixels = 0;
#   29|           fil->red.pixels = 0;
#   30|           fil->green.pixels = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def58]
imlib2-1.12.5/src/lib/filter.c:29: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   27|       {
#   28|           fil->alpha.pixels = 0;
#   29|->         fil->red.pixels = 0;
#   30|           fil->green.pixels = 0;
#   31|           fil->blue.pixels = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def59]
imlib2-1.12.5/src/lib/filter.c:30: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   28|           fil->alpha.pixels = 0;
#   29|           fil->red.pixels = 0;
#   30|->         fil->green.pixels = 0;
#   31|           fil->blue.pixels = 0;
#   32|           fil->alpha.size = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def60]
imlib2-1.12.5/src/lib/filter.c:31: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   29|           fil->red.pixels = 0;
#   30|           fil->green.pixels = 0;
#   31|->         fil->blue.pixels = 0;
#   32|           fil->alpha.size = 0;
#   33|           fil->red.size = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def61]
imlib2-1.12.5/src/lib/filter.c:32: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   30|           fil->green.pixels = 0;
#   31|           fil->blue.pixels = 0;
#   32|->         fil->alpha.size = 0;
#   33|           fil->red.size = 0;
#   34|           fil->green.size = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def62]
imlib2-1.12.5/src/lib/filter.c:33: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   31|           fil->blue.pixels = 0;
#   32|           fil->alpha.size = 0;
#   33|->         fil->red.size = 0;
#   34|           fil->green.size = 0;
#   35|           fil->blue.size = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def63]
imlib2-1.12.5/src/lib/filter.c:34: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   32|           fil->alpha.size = 0;
#   33|           fil->red.size = 0;
#   34|->         fil->green.size = 0;
#   35|           fil->blue.size = 0;
#   36|       }

Error: CPPCHECK_WARNING (CWE-476): [#def64]
imlib2-1.12.5/src/lib/filter.c:35: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   33|           fil->red.size = 0;
#   34|           fil->green.size = 0;
#   35|->         fil->blue.size = 0;
#   36|       }
#   37|       fil->alpha.entries = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def65]
imlib2-1.12.5/src/lib/filter.c:37: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   35|           fil->blue.size = 0;
#   36|       }
#   37|->     fil->alpha.entries = 0;
#   38|       fil->red.entries = 0;
#   39|       fil->green.entries = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def66]
imlib2-1.12.5/src/lib/filter.c:38: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   36|       }
#   37|       fil->alpha.entries = 0;
#   38|->     fil->red.entries = 0;
#   39|       fil->green.entries = 0;
#   40|       fil->blue.entries = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def67]
imlib2-1.12.5/src/lib/filter.c:39: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   37|       fil->alpha.entries = 0;
#   38|       fil->red.entries = 0;
#   39|->     fil->green.entries = 0;
#   40|       fil->blue.entries = 0;
#   41|       fil->alpha.div = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def68]
imlib2-1.12.5/src/lib/filter.c:40: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   38|       fil->red.entries = 0;
#   39|       fil->green.entries = 0;
#   40|->     fil->blue.entries = 0;
#   41|       fil->alpha.div = 0;
#   42|       fil->red.div = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def69]
imlib2-1.12.5/src/lib/filter.c:41: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   39|       fil->green.entries = 0;
#   40|       fil->blue.entries = 0;
#   41|->     fil->alpha.div = 0;
#   42|       fil->red.div = 0;
#   43|       fil->green.div = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def70]
imlib2-1.12.5/src/lib/filter.c:42: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   40|       fil->blue.entries = 0;
#   41|       fil->alpha.div = 0;
#   42|->     fil->red.div = 0;
#   43|       fil->green.div = 0;
#   44|       fil->blue.div = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def71]
imlib2-1.12.5/src/lib/filter.c:43: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   41|       fil->alpha.div = 0;
#   42|       fil->red.div = 0;
#   43|->     fil->green.div = 0;
#   44|       fil->blue.div = 0;
#   45|       fil->alpha.cons = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def72]
imlib2-1.12.5/src/lib/filter.c:44: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   42|       fil->red.div = 0;
#   43|       fil->green.div = 0;
#   44|->     fil->blue.div = 0;
#   45|       fil->alpha.cons = 0;
#   46|       fil->red.cons = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def73]
imlib2-1.12.5/src/lib/filter.c:45: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   43|       fil->green.div = 0;
#   44|       fil->blue.div = 0;
#   45|->     fil->alpha.cons = 0;
#   46|       fil->red.cons = 0;
#   47|       fil->green.cons = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def74]
imlib2-1.12.5/src/lib/filter.c:46: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   44|       fil->blue.div = 0;
#   45|       fil->alpha.cons = 0;
#   46|->     fil->red.cons = 0;
#   47|       fil->green.cons = 0;
#   48|       fil->blue.cons = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def75]
imlib2-1.12.5/src/lib/filter.c:47: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   45|       fil->alpha.cons = 0;
#   46|       fil->red.cons = 0;
#   47|->     fil->green.cons = 0;
#   48|       fil->blue.cons = 0;
#   49|       return fil;

Error: CPPCHECK_WARNING (CWE-476): [#def76]
imlib2-1.12.5/src/lib/filter.c:48: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fil
#   46|       fil->red.cons = 0;
#   47|       fil->green.cons = 0;
#   48|->     fil->blue.cons = 0;
#   49|       return fil;
#   50|   }

Error: CPPCHECK_WARNING (CWE-758): [#def77]
imlib2-1.12.5/src/lib/filter.c:213: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  211|                                         y);
#  212|                   a /= ad;
#  213|->                 A_VAL(p2) = SATURATE(a);
#  214|               }
#  215|               if (rd)

Error: CPPCHECK_WARNING (CWE-758): [#def78]
imlib2-1.12.5/src/lib/filter.c:219: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  217|                   r = __imlib_FilterGet(&fil->red, im->data, im->w, im->h, x, y);
#  218|                   r /= rd;
#  219|->                 R_VAL(p2) = SATURATE(r);
#  220|               }
#  221|               if (gd)

Error: CPPCHECK_WARNING (CWE-758): [#def79]
imlib2-1.12.5/src/lib/filter.c:226: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  224|                                         y);
#  225|                   g /= gd;
#  226|->                 G_VAL(p2) = SATURATE(g);
#  227|               }
#  228|               if (bd)

Error: CPPCHECK_WARNING (CWE-758): [#def80]
imlib2-1.12.5/src/lib/filter.c:232: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  230|                   b = __imlib_FilterGet(&fil->blue, im->data, im->w, im->h, x, y);
#  231|                   b /= bd;
#  232|->                 B_VAL(p2) = SATURATE(b);
#  233|               }
#  234|               p1++;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
imlib2-1.12.5/src/lib/font_draw.c:43:13: warning[-Wanalyzer-malloc-leak]: leak of 'fg'
imlib2-1.12.5/src/lib/font_draw.c:31:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_draw.c:34:13: branch_false: ...to here
imlib2-1.12.5/src/lib/font_draw.c:35:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_draw.c:38:10: branch_false: ...to here
imlib2-1.12.5/src/lib/font_draw.c:38:10: acquire_memory: allocated here
imlib2-1.12.5/src/lib/font_draw.c:39:8: branch_false: following 'false' branch (when 'fg' is non-NULL)...
imlib2-1.12.5/src/lib/font_draw.c:41:5: branch_false: ...to here
imlib2-1.12.5/src/lib/font_draw.c:43:13: throw: if 'FT_Get_Glyph' throws an exception...
imlib2-1.12.5/src/lib/font_draw.c:43:13: danger: 'fg' leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   41|       memset(fg, 0, sizeof(Imlib_Font_Glyph));
#   42|   
#   43|->     error = FT_Get_Glyph(fn->ft.face->glyph, &(fg->glyph));
#   44|       if (error)
#   45|       {

Error: CPPCHECK_WARNING (CWE-190): [#def82]
imlib2-1.12.5/src/lib/font_draw.c:373: error[integerOverflow]: Signed integer overflow for expression 'tmp<<24'.
#  371|                                           tmp = (tmp > 256) ? 256 : tmp;
#  372|                                           *dst_ptr &= 0x00ffffff;
#  373|->                                         *dst_ptr |= (tmp << 24);
#  374|                                       }
#  375|   

Error: CPPCHECK_WARNING (CWE-476): [#def83]
imlib2-1.12.5/src/lib/font_load.c:63: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: name
#   61|       /* split name in front off */
#   62|       name = malloc(namelen + 1);
#   63|->     memcpy(name, fontname, namelen);
#   64|       name[namelen] = 0;
#   65|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def84]
imlib2-1.12.5/src/lib/font_load.c:63:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'name' where non-null expected
imlib2-1.12.5/src/lib/font_load.c:35:36: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: following 'false' branch (when 'j > 0')...
imlib2-1.12.5/src/lib/font_load.c:43:28: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:62:12: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/font_load.c:63:5: danger: argument 1 ('name') from [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4) could be NULL where non-null expected
#   61|       /* split name in front off */
#   62|       name = malloc(namelen + 1);
#   63|->     memcpy(name, fontname, namelen);
#   64|       name[namelen] = 0;
#   65|   

Error: CPPCHECK_WARNING (CWE-476): [#def85]
imlib2-1.12.5/src/lib/font_load.c:64: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: name
#   62|       name = malloc(namelen + 1);
#   63|       memcpy(name, fontname, namelen);
#   64|->     name[namelen] = 0;
#   65|   
#   66|       /* find file if it exists */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
imlib2-1.12.5/src/lib/font_load.c:72:9: warning[-Wanalyzer-malloc-leak]: leak of 'name'
imlib2-1.12.5/src/lib/font_load.c:35:36: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: following 'false' branch (when 'j > 0')...
imlib2-1.12.5/src/lib/font_load.c:43:28: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:62:12: acquire_memory: allocated here
imlib2-1.12.5/src/lib/font_load.c:68:8: branch_false: following 'false' branch (when 'tmp' is non-NULL)...
imlib2-1.12.5/src/lib/font_load.c:71:5: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:72:9: throw: if '__imlib_FileIsFile' throws an exception...
imlib2-1.12.5/src/lib/font_load.c:72:9: danger: 'name' leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   70|   
#   71|       sprintf(tmp, "%s.ttf", name);
#   72|->     if (__imlib_FileIsFile(tmp))
#   73|           file = strdup(tmp);
#   74|       else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
imlib2-1.12.5/src/lib/font_load.c:72:9: warning[-Wanalyzer-malloc-leak]: leak of 'tmp'
imlib2-1.12.5/src/lib/font_load.c:35:36: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: following 'false' branch (when 'j > 0')...
imlib2-1.12.5/src/lib/font_load.c:43:28: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:67:11: acquire_memory: allocated here
imlib2-1.12.5/src/lib/font_load.c:68:8: branch_false: following 'false' branch (when 'tmp' is non-NULL)...
imlib2-1.12.5/src/lib/font_load.c:71:5: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:72:9: throw: if '__imlib_FileIsFile' throws an exception...
imlib2-1.12.5/src/lib/font_load.c:72:9: danger: 'tmp' leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#   70|   
#   71|       sprintf(tmp, "%s.ttf", name);
#   72|->     if (__imlib_FileIsFile(tmp))
#   73|           file = strdup(tmp);
#   74|       else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
imlib2-1.12.5/src/lib/font_load.c:77:13: warning[-Wanalyzer-malloc-leak]: leak of 'name'
imlib2-1.12.5/src/lib/font_load.c:35:36: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: following 'false' branch (when 'j > 0')...
imlib2-1.12.5/src/lib/font_load.c:43:28: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:62:12: acquire_memory: allocated here
imlib2-1.12.5/src/lib/font_load.c:68:8: branch_false: following 'false' branch (when 'tmp' is non-NULL)...
imlib2-1.12.5/src/lib/font_load.c:71:5: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:72:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:76:9: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:77:13: throw: if '__imlib_FileIsFile' throws an exception...
imlib2-1.12.5/src/lib/font_load.c:77:13: danger: 'name' leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#   75|       {
#   76|           sprintf(tmp, "%s.TTF", name);
#   77|->         if (__imlib_FileIsFile(tmp))
#   78|               file = strdup(tmp);
#   79|           else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
imlib2-1.12.5/src/lib/font_load.c:77:13: warning[-Wanalyzer-malloc-leak]: leak of 'tmp'
imlib2-1.12.5/src/lib/font_load.c:35:36: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: following 'false' branch (when 'j > 0')...
imlib2-1.12.5/src/lib/font_load.c:43:28: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:67:11: acquire_memory: allocated here
imlib2-1.12.5/src/lib/font_load.c:68:8: branch_false: following 'false' branch (when 'tmp' is non-NULL)...
imlib2-1.12.5/src/lib/font_load.c:71:5: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:72:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:76:9: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:77:13: throw: if '__imlib_FileIsFile' throws an exception...
imlib2-1.12.5/src/lib/font_load.c:77:13: danger: 'tmp' leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#   75|       {
#   76|           sprintf(tmp, "%s.TTF", name);
#   77|->         if (__imlib_FileIsFile(tmp))
#   78|               file = strdup(tmp);
#   79|           else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
imlib2-1.12.5/src/lib/font_load.c:82:17: warning[-Wanalyzer-malloc-leak]: leak of 'name'
imlib2-1.12.5/src/lib/font_load.c:35:36: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: following 'false' branch (when 'j > 0')...
imlib2-1.12.5/src/lib/font_load.c:43:28: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:62:12: acquire_memory: allocated here
imlib2-1.12.5/src/lib/font_load.c:68:8: branch_false: following 'false' branch (when 'tmp' is non-NULL)...
imlib2-1.12.5/src/lib/font_load.c:71:5: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:72:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:76:9: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:77:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:81:13: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:82:17: throw: if '__imlib_FileIsFile' throws an exception...
imlib2-1.12.5/src/lib/font_load.c:82:17: danger: 'name' leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#   80|           {
#   81|               sprintf(tmp, "%s", name);
#   82|->             if (__imlib_FileIsFile(tmp))
#   83|                   file = strdup(tmp);
#   84|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
imlib2-1.12.5/src/lib/font_load.c:82:17: warning[-Wanalyzer-malloc-leak]: leak of 'tmp'
imlib2-1.12.5/src/lib/font_load.c:35:36: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: following 'false' branch (when 'j > 0')...
imlib2-1.12.5/src/lib/font_load.c:43:28: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:67:11: acquire_memory: allocated here
imlib2-1.12.5/src/lib/font_load.c:68:8: branch_false: following 'false' branch (when 'tmp' is non-NULL)...
imlib2-1.12.5/src/lib/font_load.c:71:5: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:72:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:76:9: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:77:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:81:13: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:82:17: throw: if '__imlib_FileIsFile' throws an exception...
imlib2-1.12.5/src/lib/font_load.c:82:17: danger: 'tmp' leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#   80|           {
#   81|               sprintf(tmp, "%s", name);
#   82|->             if (__imlib_FileIsFile(tmp))
#   83|                   file = strdup(tmp);
#   84|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
imlib2-1.12.5/src/lib/font_load.c:97:17: warning[-Wanalyzer-malloc-leak]: leak of 'name'
imlib2-1.12.5/src/lib/font_load.c:35:36: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: following 'false' branch (when 'j > 0')...
imlib2-1.12.5/src/lib/font_load.c:43:28: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:62:12: acquire_memory: allocated here
imlib2-1.12.5/src/lib/font_load.c:68:8: branch_false: following 'false' branch (when 'tmp' is non-NULL)...
imlib2-1.12.5/src/lib/font_load.c:71:5: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:88:8: branch_true: following 'true' branch (when 'file' is NULL)...
imlib2-1.12.5/src/lib/font_load.c:88:8: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:90:21: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:93:16: branch_false: following 'false' branch (when 'tmp' is non-NULL)...
imlib2-1.12.5/src/lib/font_load.c:96:13: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:97:17: throw: if '__imlib_FileIsFile' throws an exception...
imlib2-1.12.5/src/lib/font_load.c:97:17: danger: 'name' leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#   95|   
#   96|               sprintf(tmp, "%s/%s.ttf", fpath[j], name);
#   97|->             if (__imlib_FileIsFile(tmp))
#   98|                   file = strdup(tmp);
#   99|               else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
imlib2-1.12.5/src/lib/font_load.c:97:17: warning[-Wanalyzer-malloc-leak]: leak of 'tmp'
imlib2-1.12.5/src/lib/font_load.c:35:36: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: following 'false' branch (when 'j > 0')...
imlib2-1.12.5/src/lib/font_load.c:43:28: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:67:11: acquire_memory: allocated here
imlib2-1.12.5/src/lib/font_load.c:68:8: branch_false: following 'false' branch (when 'tmp' is non-NULL)...
imlib2-1.12.5/src/lib/font_load.c:71:5: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:88:8: branch_true: following 'true' branch (when 'file' is NULL)...
imlib2-1.12.5/src/lib/font_load.c:88:8: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:90:21: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:92:19: acquire_memory: allocated here
imlib2-1.12.5/src/lib/font_load.c:93:16: branch_false: following 'false' branch (when 'tmp' is non-NULL)...
imlib2-1.12.5/src/lib/font_load.c:96:13: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:97:17: throw: if '__imlib_FileIsFile' throws an exception...
imlib2-1.12.5/src/lib/font_load.c:97:17: danger: 'tmp' leaks here; was allocated at [(13)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/12)
#   95|   
#   96|               sprintf(tmp, "%s/%s.ttf", fpath[j], name);
#   97|->             if (__imlib_FileIsFile(tmp))
#   98|                   file = strdup(tmp);
#   99|               else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
imlib2-1.12.5/src/lib/font_load.c:102:21: warning[-Wanalyzer-malloc-leak]: leak of 'name'
imlib2-1.12.5/src/lib/font_load.c:35:36: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: following 'false' branch (when 'j > 0')...
imlib2-1.12.5/src/lib/font_load.c:43:28: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:62:12: acquire_memory: allocated here
imlib2-1.12.5/src/lib/font_load.c:68:8: branch_false: following 'false' branch (when 'tmp' is non-NULL)...
imlib2-1.12.5/src/lib/font_load.c:71:5: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:88:8: branch_true: following 'true' branch (when 'file' is NULL)...
imlib2-1.12.5/src/lib/font_load.c:88:8: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:90:21: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:93:16: branch_false: following 'false' branch (when 'tmp' is non-NULL)...
imlib2-1.12.5/src/lib/font_load.c:96:13: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:102:21: throw: if '__imlib_FileIsFile' throws an exception...
imlib2-1.12.5/src/lib/font_load.c:102:21: danger: 'name' leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#  100|               {
#  101|                   sprintf(tmp, "%s/%s.TTF", fpath[j], name);
#  102|->                 if (__imlib_FileIsFile(tmp))
#  103|                       file = strdup(tmp);
#  104|                   else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
imlib2-1.12.5/src/lib/font_load.c:102:21: warning[-Wanalyzer-malloc-leak]: leak of 'tmp'
imlib2-1.12.5/src/lib/font_load.c:35:36: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: following 'false' branch (when 'j > 0')...
imlib2-1.12.5/src/lib/font_load.c:43:28: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:67:11: acquire_memory: allocated here
imlib2-1.12.5/src/lib/font_load.c:68:8: branch_false: following 'false' branch (when 'tmp' is non-NULL)...
imlib2-1.12.5/src/lib/font_load.c:71:5: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:88:8: branch_true: following 'true' branch (when 'file' is NULL)...
imlib2-1.12.5/src/lib/font_load.c:88:8: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:90:21: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:92:19: acquire_memory: allocated here
imlib2-1.12.5/src/lib/font_load.c:93:16: branch_false: following 'false' branch (when 'tmp' is non-NULL)...
imlib2-1.12.5/src/lib/font_load.c:96:13: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:102:21: throw: if '__imlib_FileIsFile' throws an exception...
imlib2-1.12.5/src/lib/font_load.c:102:21: danger: 'tmp' leaks here; was allocated at [(13)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/12)
#  100|               {
#  101|                   sprintf(tmp, "%s/%s.TTF", fpath[j], name);
#  102|->                 if (__imlib_FileIsFile(tmp))
#  103|                       file = strdup(tmp);
#  104|                   else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
imlib2-1.12.5/src/lib/font_load.c:107:25: warning[-Wanalyzer-malloc-leak]: leak of 'name'
imlib2-1.12.5/src/lib/font_load.c:35:36: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: following 'false' branch (when 'j > 0')...
imlib2-1.12.5/src/lib/font_load.c:43:28: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:62:12: acquire_memory: allocated here
imlib2-1.12.5/src/lib/font_load.c:68:8: branch_false: following 'false' branch (when 'tmp' is non-NULL)...
imlib2-1.12.5/src/lib/font_load.c:71:5: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:88:8: branch_true: following 'true' branch (when 'file' is NULL)...
imlib2-1.12.5/src/lib/font_load.c:88:8: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:90:21: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:93:16: branch_false: following 'false' branch (when 'tmp' is non-NULL)...
imlib2-1.12.5/src/lib/font_load.c:96:13: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:102:20: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:106:48: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:107:25: throw: if '__imlib_FileIsFile' throws an exception...
imlib2-1.12.5/src/lib/font_load.c:107:25: danger: 'name' leaks here; was allocated at [(5)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/4)
#  105|                   {
#  106|                       sprintf(tmp, "%s/%s", fpath[j], name);
#  107|->                     if (__imlib_FileIsFile(tmp))
#  108|                           file = strdup(tmp);
#  109|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
imlib2-1.12.5/src/lib/font_load.c:107:25: warning[-Wanalyzer-malloc-leak]: leak of 'tmp'
imlib2-1.12.5/src/lib/font_load.c:35:36: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:39:8: branch_false: following 'false' branch (when 'j > 0')...
imlib2-1.12.5/src/lib/font_load.c:43:28: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:67:11: acquire_memory: allocated here
imlib2-1.12.5/src/lib/font_load.c:68:8: branch_false: following 'false' branch (when 'tmp' is non-NULL)...
imlib2-1.12.5/src/lib/font_load.c:71:5: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:88:8: branch_true: following 'true' branch (when 'file' is NULL)...
imlib2-1.12.5/src/lib/font_load.c:88:8: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:90:21: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:92:19: acquire_memory: allocated here
imlib2-1.12.5/src/lib/font_load.c:93:16: branch_false: following 'false' branch (when 'tmp' is non-NULL)...
imlib2-1.12.5/src/lib/font_load.c:96:13: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:102:20: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:106:48: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:107:25: throw: if '__imlib_FileIsFile' throws an exception...
imlib2-1.12.5/src/lib/font_load.c:107:25: danger: 'tmp' leaks here; was allocated at [(13)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/12)
#  105|                   {
#  106|                       sprintf(tmp, "%s/%s", fpath[j], name);
#  107|->                     if (__imlib_FileIsFile(tmp))
#  108|                           file = strdup(tmp);
#  109|                   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
imlib2-1.12.5/src/lib/font_load.c:143:13: warning[-Wanalyzer-malloc-leak]: leak of 'fn'
imlib2-1.12.5/src/lib/font_load.c:135:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:138:5: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:140:10: acquire_memory: allocated here
imlib2-1.12.5/src/lib/font_load.c:143:13: throw: if 'FT_New_Face' throws an exception...
imlib2-1.12.5/src/lib/font_load.c:143:13: danger: 'fn' leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
#  141|       file = (char *)name;
#  142|   
#  143|->     error = FT_New_Face(ft_lib, file, faceidx, &(fn->ft.face));
#  144|       if (error)
#  145|       {

Error: CPPCHECK_WARNING (CWE-476): [#def99]
imlib2-1.12.5/src/lib/font_load.c:149: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fn
#  147|           return NULL;
#  148|       }
#  149|->     error = FT_Set_Char_Size(fn->ft.face, 0, (size * 64), 96, 96);
#  150|       if (error)
#  151|           error = FT_Set_Pixel_Sizes(fn->ft.face, 0, size);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def100]
imlib2-1.12.5/src/lib/font_load.c:190:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'fn'
imlib2-1.12.5/src/lib/font_load.c:135:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:138:5: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:140:10: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/font_load.c:144:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:149:46: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:190:5: danger: 'fn' could be NULL: unchecked value from [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
#  188|       }
#  189|   
#  190|->     fn->file = strdup(file);
#  191|       fn->name = strdup(file);
#  192|       fn->size = size;

Error: CPPCHECK_WARNING (CWE-401): [#def101]
imlib2-1.12.5/src/lib/font_load.c:372: error[memleakOnRealloc]: Common realloc mistake: 'fpath' nulled but not freed upon failure
#  370|           fpath = malloc(sizeof(char *));
#  371|       else
#  372|->         fpath = realloc(fpath, (fpath_num * sizeof(char *)));
#  373|       fpath[fpath_num - 1] = strdup(path);
#  374|   }

Error: CPPCHECK_WARNING (CWE-476): [#def102]
imlib2-1.12.5/src/lib/font_load.c:373: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: fpath
#  371|       else
#  372|           fpath = realloc(fpath, (fpath_num * sizeof(char *)));
#  373|->     fpath[fpath_num - 1] = strdup(path);
#  374|   }
#  375|   

Error: CPPCHECK_WARNING (CWE-401): [#def103]
imlib2-1.12.5/src/lib/font_load.c:390: error[memleakOnRealloc]: Common realloc mistake: 'fpath' nulled but not freed upon failure
#  388|                   fpath[j] = fpath[j + 1];
#  389|               if (fpath_num > 0)
#  390|->                 fpath = realloc(fpath, fpath_num * sizeof(char *));
#  391|               else
#  392|               {

Error: GCC_ANALYZER_WARNING (CWE-122): [#def104]
imlib2-1.12.5/src/lib/font_load.c:390:25: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
imlib2-1.12.5/src/lib/font_load.c:381:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:383:32: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:383:12: branch_false: following 'false' branch (when the strings are non-equal)...
imlib2-1.12.5/src/lib/font_load.c:381:32: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:381:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:383:32: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:383:12: branch_true: following 'true' branch (when the strings are equal)...
imlib2-1.12.5/src/lib/font_load.c:385:13: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:387:25: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:389:16: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:389:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:390:25: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:381:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:383:32: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:387:25: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/font_load.c:389:16: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:389:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:390:25: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:390:25: danger: write of '(long unsigned int)(fpath_num + -1) * 8' bytes at offset '0' exceeds the buffer
#  388|                   fpath[j] = fpath[j + 1];
#  389|               if (fpath_num > 0)
#  390|->                 fpath = realloc(fpath, fpath_num * sizeof(char *));
#  391|               else
#  392|               {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def105]
imlib2-1.12.5/src/lib/font_load.c:439:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'path' where non-null expected
imlib2-1.12.5/src/lib/font_load.c:431:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:433:36: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:438:24: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/font_load.c:439:17: danger: argument 1 ('path') from [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
#  437|               {
#  438|                   path = malloc(strlen(fpath[i]) + strlen(dir[j]) + 2);
#  439|->                 sprintf(path, "%s/%s", fpath[i], dir[j]);
#  440|                   /* trim .ttf if it is there */
#  441|                   if ((p = strrchr(dir[j], '.')))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
imlib2-1.12.5/src/lib/font_load.c:443:22: warning[-Wanalyzer-malloc-leak]: leak of 'path'
imlib2-1.12.5/src/lib/font_load.c:431:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:433:36: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:438:24: acquire_memory: allocated here
imlib2-1.12.5/src/lib/font_load.c:441:20: branch_false: following 'false' branch (when 'p' is NULL)...
imlib2-1.12.5/src/lib/font_load.c:443:22: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:443:22: throw: if '__imlib_ItemInList' throws an exception...
imlib2-1.12.5/src/lib/font_load.c:443:22: danger: 'path' leaks here; was allocated at [(3)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/2)
#  441|                   if ((p = strrchr(dir[j], '.')))
#  442|                       *p = '\0';
#  443|->                 if (!__imlib_ItemInList(list, l, dir[j]))
#  444|                   {
#  445|                       if (__imlib_FileIsFile(path))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
imlib2-1.12.5/src/lib/font_load.c:445:25: warning[-Wanalyzer-malloc-leak]: leak of 'path'
imlib2-1.12.5/src/lib/font_load.c:431:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:433:36: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:438:24: acquire_memory: allocated here
imlib2-1.12.5/src/lib/font_load.c:441:20: branch_false: following 'false' branch (when 'p' is NULL)...
imlib2-1.12.5/src/lib/font_load.c:443:22: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:443:20: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:445:25: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:445:25: throw: if '__imlib_FileIsFile' throws an exception...
imlib2-1.12.5/src/lib/font_load.c:445:25: danger: 'path' leaks here; was allocated at [(3)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/2)
#  443|                   if (!__imlib_ItemInList(list, l, dir[j]))
#  444|                   {
#  445|->                     if (__imlib_FileIsFile(path))
#  446|                       {
#  447|                           FT_Face         f;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
imlib2-1.12.5/src/lib/font_load.c:449:33: warning[-Wanalyzer-malloc-leak]: leak of 'path'
imlib2-1.12.5/src/lib/font_load.c:431:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:433:36: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:438:24: acquire_memory: allocated here
imlib2-1.12.5/src/lib/font_load.c:441:20: branch_false: following 'false' branch (when 'p' is NULL)...
imlib2-1.12.5/src/lib/font_load.c:443:22: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:443:20: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:445:25: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:445:24: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:449:33: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:449:33: throw: if 'FT_New_Face' throws an exception...
imlib2-1.12.5/src/lib/font_load.c:449:33: danger: 'path' leaks here; was allocated at [(3)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/2)
#  447|                           FT_Face         f;
#  448|   
#  449|->                         error = FT_New_Face(ft_lib, path, 0, &f);
#  450|                           if (!error)
#  451|                           {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def109]
imlib2-1.12.5/src/lib/font_load.c:452:29: warning[-Wanalyzer-malloc-leak]: leak of 'path'
imlib2-1.12.5/src/lib/font_load.c:431:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:433:36: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:438:24: acquire_memory: allocated here
imlib2-1.12.5/src/lib/font_load.c:441:20: branch_false: following 'false' branch (when 'p' is NULL)...
imlib2-1.12.5/src/lib/font_load.c:443:22: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:443:20: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:445:25: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:445:24: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:449:33: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:450:28: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:452:29: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:452:29: throw: if 'FT_Done_Face' throws an exception...
imlib2-1.12.5/src/lib/font_load.c:452:29: danger: 'path' leaks here; was allocated at [(3)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/2)
#  450|                           if (!error)
#  451|                           {
#  452|->                             FT_Done_Face(f);
#  453|                               l++;
#  454|                               if (list)

Error: CPPCHECK_WARNING (CWE-401): [#def110]
imlib2-1.12.5/src/lib/font_load.c:455: error[memleakOnRealloc]: Common realloc mistake: 'list' nulled but not freed upon failure
#  453|                               l++;
#  454|                               if (list)
#  455|->                                 list = realloc(list, sizeof(char *) * l);
#  456|                               else
#  457|                                   list = malloc(sizeof(char *));

Error: CPPCHECK_WARNING (CWE-476): [#def111]
imlib2-1.12.5/src/lib/font_load.c:458: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: list
#  456|                               else
#  457|                                   list = malloc(sizeof(char *));
#  458|->                             list[l - 1] = strdup(dir[j]);
#  459|                           }
#  460|                       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def112]
imlib2-1.12.5/src/lib/font_load.c:458:29: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'list'
imlib2-1.12.5/src/lib/font_load.c:431:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:433:36: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:441:20: branch_false: following 'false' branch (when 'p' is NULL)...
imlib2-1.12.5/src/lib/font_load.c:443:22: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:443:20: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:445:25: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:445:24: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:449:33: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:450:28: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/font_load.c:452:29: branch_true: ...to here
imlib2-1.12.5/src/lib/font_load.c:454:32: branch_false: following 'false' branch (when 'list' is NULL)...
imlib2-1.12.5/src/lib/font_load.c:457:40: branch_false: ...to here
imlib2-1.12.5/src/lib/font_load.c:457:40: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/font_load.c:458:29: danger: 'list + ((long unsigned int)l + 18446744073709551615) * 8' could be NULL: unchecked value from [(13)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/12)
#  456|                               else
#  457|                                   list = malloc(sizeof(char *));
#  458|->                             list[l - 1] = strdup(dir[j]);
#  459|                           }
#  460|                       }

Error: CPPCHECK_WARNING (CWE-476): [#def113]
imlib2-1.12.5/src/lib/grad.c:56: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rc
#   54|   
#   55|       rc = malloc(sizeof(ImlibRangeColor));
#   56|->     rc->red = r;
#   57|       rc->green = g;
#   58|       rc->blue = b;

Error: CPPCHECK_WARNING (CWE-476): [#def114]
imlib2-1.12.5/src/lib/grad.c:57: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rc
#   55|       rc = malloc(sizeof(ImlibRangeColor));
#   56|       rc->red = r;
#   57|->     rc->green = g;
#   58|       rc->blue = b;
#   59|       rc->alpha = a;

Error: CPPCHECK_WARNING (CWE-476): [#def115]
imlib2-1.12.5/src/lib/grad.c:58: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rc
#   56|       rc->red = r;
#   57|       rc->green = g;
#   58|->     rc->blue = b;
#   59|       rc->alpha = a;
#   60|       rc->distance = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def116]
imlib2-1.12.5/src/lib/grad.c:59: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rc
#   57|       rc->green = g;
#   58|       rc->blue = b;
#   59|->     rc->alpha = a;
#   60|       rc->distance = 0;
#   61|       rc->next = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def117]
imlib2-1.12.5/src/lib/grad.c:60: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rc
#   58|       rc->blue = b;
#   59|       rc->alpha = a;
#   60|->     rc->distance = 0;
#   61|       rc->next = NULL;
#   62|   

Error: CPPCHECK_WARNING (CWE-476): [#def118]
imlib2-1.12.5/src/lib/grad.c:61: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rc
#   59|       rc->alpha = a;
#   60|       rc->distance = 0;
#   61|->     rc->next = NULL;
#   62|   
#   63|       p = rg->color;

Error: CPPCHECK_WARNING (CWE-476): [#def119]
imlib2-1.12.5/src/lib/grad.c:127: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pmap
#  125|       for (i = 0; i < len; i++)
#  126|       {
#  127|->         v = pmap[l >> 16];
#  128|           if ((l >> 16) < ll)
#  129|               vv = pmap[(l >> 16) + 1];

Error: CPPCHECK_WARNING (CWE-476): [#def120]
imlib2-1.12.5/src/lib/grad.c:146: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: map
#  144|           b = ((b * v2) + (bb * v1)) >> 16;
#  145|           a = ((a * v2) + (aa * v1)) >> 16;
#  146|->         map[i] = PIXEL_ARGB(a, r, g, b);
#  147|           l += inc;
#  148|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def121]
imlib2-1.12.5/src/lib/grad.c:185:17: warning[-Wanalyzer-malloc-leak]: leak of 'map'
imlib2-1.12.5/src/lib/grad.c:161:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/grad.c:163:10: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:163:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/grad.c:163:8: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:166:25: branch_true: following 'true' branch (when 'p' is non-NULL)...
imlib2-1.12.5/src/lib/grad.c:167:15: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:168:11: acquire_memory: allocated here
imlib2-1.12.5/src/lib/grad.c:171:25: branch_true: following 'true' branch (when 'p' is non-NULL)...
imlib2-1.12.5/src/lib/grad.c:173:13: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:173:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/grad.c:173:12: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:185:17: throw: if '__imlib_rgb_to_hsv' throws an exception...
imlib2-1.12.5/src/lib/grad.c:185:17: danger: 'map' leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  183|                   b = p->blue;
#  184|                   bb = p->next->blue;
#  185|->                 __imlib_rgb_to_hsv(r, g, b, &h1, &s1, &v1);
#  186|                   __imlib_rgb_to_hsv(rr, gg, bb, &h2, &s2, &v2);
#  187|                   h = ((h1 * k2) + (h2 * k1)) / 65536.0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def122]
imlib2-1.12.5/src/lib/grad.c:185:17: warning[-Wanalyzer-malloc-leak]: leak of 'pmap'
imlib2-1.12.5/src/lib/grad.c:161:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/grad.c:163:10: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:163:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/grad.c:163:8: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:166:25: branch_true: following 'true' branch (when 'p' is non-NULL)...
imlib2-1.12.5/src/lib/grad.c:167:15: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:169:12: acquire_memory: allocated here
imlib2-1.12.5/src/lib/grad.c:171:25: branch_true: following 'true' branch (when 'p' is non-NULL)...
imlib2-1.12.5/src/lib/grad.c:173:13: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:173:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/grad.c:173:12: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:185:17: throw: if '__imlib_rgb_to_hsv' throws an exception...
imlib2-1.12.5/src/lib/grad.c:185:17: danger: 'pmap' leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  183|                   b = p->blue;
#  184|                   bb = p->next->blue;
#  185|->                 __imlib_rgb_to_hsv(r, g, b, &h1, &s1, &v1);
#  186|                   __imlib_rgb_to_hsv(rr, gg, bb, &h2, &s2, &v2);
#  187|                   h = ((h1 * k2) + (h2 * k1)) / 65536.0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def123]
imlib2-1.12.5/src/lib/grad.c:186:17: warning[-Wanalyzer-malloc-leak]: leak of 'map'
imlib2-1.12.5/src/lib/grad.c:161:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/grad.c:163:10: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:163:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/grad.c:163:8: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:166:25: branch_true: following 'true' branch (when 'p' is non-NULL)...
imlib2-1.12.5/src/lib/grad.c:167:15: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:168:11: acquire_memory: allocated here
imlib2-1.12.5/src/lib/grad.c:171:25: branch_true: following 'true' branch (when 'p' is non-NULL)...
imlib2-1.12.5/src/lib/grad.c:173:13: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:173:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/grad.c:173:12: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:186:17: throw: if '__imlib_rgb_to_hsv' throws an exception...
imlib2-1.12.5/src/lib/grad.c:186:17: danger: 'map' leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  184|                   bb = p->next->blue;
#  185|                   __imlib_rgb_to_hsv(r, g, b, &h1, &s1, &v1);
#  186|->                 __imlib_rgb_to_hsv(rr, gg, bb, &h2, &s2, &v2);
#  187|                   h = ((h1 * k2) + (h2 * k1)) / 65536.0;
#  188|                   s = ((s1 * k2) + (s2 * k1)) / 65536.0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
imlib2-1.12.5/src/lib/grad.c:186:17: warning[-Wanalyzer-malloc-leak]: leak of 'pmap'
imlib2-1.12.5/src/lib/grad.c:161:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/grad.c:163:10: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:163:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/grad.c:163:8: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:166:25: branch_true: following 'true' branch (when 'p' is non-NULL)...
imlib2-1.12.5/src/lib/grad.c:167:15: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:169:12: acquire_memory: allocated here
imlib2-1.12.5/src/lib/grad.c:171:25: branch_true: following 'true' branch (when 'p' is non-NULL)...
imlib2-1.12.5/src/lib/grad.c:173:13: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:173:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/grad.c:173:12: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:186:17: throw: if '__imlib_rgb_to_hsv' throws an exception...
imlib2-1.12.5/src/lib/grad.c:186:17: danger: 'pmap' leaks here; was allocated at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  184|                   bb = p->next->blue;
#  185|                   __imlib_rgb_to_hsv(r, g, b, &h1, &s1, &v1);
#  186|->                 __imlib_rgb_to_hsv(rr, gg, bb, &h2, &s2, &v2);
#  187|                   h = ((h1 * k2) + (h2 * k1)) / 65536.0;
#  188|                   s = ((s1 * k2) + (s2 * k1)) / 65536.0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
imlib2-1.12.5/src/lib/grad.c:190:17: warning[-Wanalyzer-malloc-leak]: leak of 'map'
imlib2-1.12.5/src/lib/grad.c:161:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/grad.c:163:10: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:163:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/grad.c:163:8: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:166:25: branch_true: following 'true' branch (when 'p' is non-NULL)...
imlib2-1.12.5/src/lib/grad.c:167:15: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:168:11: acquire_memory: allocated here
imlib2-1.12.5/src/lib/grad.c:171:25: branch_true: following 'true' branch (when 'p' is non-NULL)...
imlib2-1.12.5/src/lib/grad.c:173:13: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:173:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/grad.c:173:12: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:190:17: throw: if '__imlib_hsv_to_rgb' throws an exception...
imlib2-1.12.5/src/lib/grad.c:190:17: danger: 'map' leaks here; was allocated at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  188|                   s = ((s1 * k2) + (s2 * k1)) / 65536.0;
#  189|                   v = ((v1 * k2) + (v2 * k1)) / 65536.0;
#  190|->                 __imlib_hsv_to_rgb(h, s, v, &r, &g, &b);
#  191|                   a = (unsigned long int)((p->alpha * k2) +
#  192|                                           (p->next->alpha * k1)) >> 16;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
imlib2-1.12.5/src/lib/grad.c:190:17: warning[-Wanalyzer-malloc-leak]: leak of 'pmap'
imlib2-1.12.5/src/lib/grad.c:161:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/grad.c:163:10: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:163:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/grad.c:163:8: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:166:25: branch_true: following 'true' branch (when 'p' is non-NULL)...
imlib2-1.12.5/src/lib/grad.c:167:15: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:169:12: acquire_memory: allocated here
imlib2-1.12.5/src/lib/grad.c:171:25: branch_true: following 'true' branch (when 'p' is non-NULL)...
imlib2-1.12.5/src/lib/grad.c:173:13: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:173:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/grad.c:173:12: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:190:17: throw: if '__imlib_hsv_to_rgb' throws an exception...
imlib2-1.12.5/src/lib/grad.c:190:17: danger: 'pmap' leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  188|                   s = ((s1 * k2) + (s2 * k1)) / 65536.0;
#  189|                   v = ((v1 * k2) + (v2 * k1)) / 65536.0;
#  190|->                 __imlib_hsv_to_rgb(h, s, v, &r, &g, &b);
#  191|                   a = (unsigned long int)((p->alpha * k2) +
#  192|                                           (p->next->alpha * k1)) >> 16;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def127]
imlib2-1.12.5/src/lib/grad.c:193:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'pmap'
imlib2-1.12.5/src/lib/grad.c:161:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/grad.c:163:10: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:163:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/grad.c:163:8: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:166:25: branch_true: following 'true' branch (when 'p' is non-NULL)...
imlib2-1.12.5/src/lib/grad.c:167:15: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:169:12: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/grad.c:171:25: branch_true: following 'true' branch (when 'p' is non-NULL)...
imlib2-1.12.5/src/lib/grad.c:173:13: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:173:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/grad.c:173:12: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:193:17: danger: 'pmap + (long unsigned int)i * 4' could be NULL: unchecked value from [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
#  191|                   a = (unsigned long int)((p->alpha * k2) +
#  192|                                           (p->next->alpha * k1)) >> 16;
#  193|->                 pmap[i++] = PIXEL_ARGB(a, r, g, b);
#  194|               }
#  195|           }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def128]
imlib2-1.12.5/src/lib/grad.c:202:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'pmap'
imlib2-1.12.5/src/lib/grad.c:161:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/grad.c:163:10: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:163:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/grad.c:163:8: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:166:25: branch_true: following 'true' branch (when 'p' is non-NULL)...
imlib2-1.12.5/src/lib/grad.c:167:15: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:169:12: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/grad.c:171:25: branch_true: following 'true' branch (when 'p' is non-NULL)...
imlib2-1.12.5/src/lib/grad.c:173:13: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:173:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/grad.c:173:12: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:175:25: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/grad.c:171:28: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:171:25: branch_true: following 'true' branch (when 'p' is non-NULL)...
imlib2-1.12.5/src/lib/grad.c:173:13: branch_true: ...to here
imlib2-1.12.5/src/lib/grad.c:202:13: danger: 'pmap + (long unsigned int)i * 4' could be NULL: unchecked value from [(7)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/6)
#  200|               b = p->blue;
#  201|               a = p->alpha;
#  202|->             pmap[i++] = PIXEL_ARGB(a, r, g, b);
#  203|           }
#  204|       }

Error: CPPCHECK_WARNING (CWE-476): [#def129]
imlib2-1.12.5/src/lib/grad.c:209: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: pmap
#  207|       for (i = 0; i < len; i++)
#  208|       {
#  209|->         k = pmap[l >> 16];
#  210|           if ((l >> 16) < ll)
#  211|               kk = pmap[(l >> 16) + 1];

Error: CPPCHECK_WARNING (CWE-476): [#def130]
imlib2-1.12.5/src/lib/grad.c:231: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: map
#  229|           __imlib_hsv_to_rgb(h, s, v, &r, &g, &b);
#  230|           a = (unsigned long int)((a * k2) + (aa * k1)) >> 16;
#  231|->         map[i] = PIXEL_ARGB(a, r, g, b);
#  232|           l += inc;
#  233|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
imlib2-1.12.5/src/lib/grad.c:307:11: warning[-Wanalyzer-malloc-leak]: leak of 'hlut'
imlib2-1.12.5/src/lib/grad.c:261:8: branch_false: following 'false' branch (when 'w > 0')...
imlib2-1.12.5/src/lib/grad.c:263:9: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:265:8: branch_false: following 'false' branch (when 'w > 0')...
imlib2-1.12.5/src/lib/grad.c:267:8: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:273:8: branch_false: following 'false' branch (when 'h > 0')...
imlib2-1.12.5/src/lib/grad.c:275:9: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:277:8: branch_false: following 'false' branch (when 'h > 0')...
imlib2-1.12.5/src/lib/grad.c:279:8: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:296:12: acquire_memory: allocated here
imlib2-1.12.5/src/lib/grad.c:297:8: branch_false: following 'false' branch (when 'hlut' is non-NULL)...
imlib2-1.12.5/src/lib/grad.c:299:12: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:300:8: branch_false: following 'false' branch (when 'vlut' is non-NULL)...
imlib2-1.12.5/src/lib/grad.c:303:8: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:307:11: throw: if the called function throws an exception...
imlib2-1.12.5/src/lib/grad.c:307:11: danger: 'hlut' leaks here; was allocated at [(9)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/8)
#  305|       else
#  306|           len = hh * 16;
#  307|->     map = rmf(rg, len);
#  308|       if (!map)
#  309|           goto quit;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def132]
imlib2-1.12.5/src/lib/grad.c:307:11: warning[-Wanalyzer-malloc-leak]: leak of 'vlut'
imlib2-1.12.5/src/lib/grad.c:261:8: branch_false: following 'false' branch (when 'w > 0')...
imlib2-1.12.5/src/lib/grad.c:263:9: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:265:8: branch_false: following 'false' branch (when 'w > 0')...
imlib2-1.12.5/src/lib/grad.c:267:8: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:273:8: branch_false: following 'false' branch (when 'h > 0')...
imlib2-1.12.5/src/lib/grad.c:275:9: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:277:8: branch_false: following 'false' branch (when 'h > 0')...
imlib2-1.12.5/src/lib/grad.c:279:8: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:297:8: branch_false: following 'false' branch (when 'hlut' is non-NULL)...
imlib2-1.12.5/src/lib/grad.c:299:12: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:299:12: acquire_memory: allocated here
imlib2-1.12.5/src/lib/grad.c:300:8: branch_false: following 'false' branch (when 'vlut' is non-NULL)...
imlib2-1.12.5/src/lib/grad.c:303:8: branch_false: ...to here
imlib2-1.12.5/src/lib/grad.c:307:11: throw: if the called function throws an exception...
imlib2-1.12.5/src/lib/grad.c:307:11: danger: 'vlut' leaks here; was allocated at [(11)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/10)
#  305|       else
#  306|           len = hh * 16;
#  307|->     map = rmf(rg, len);
#  308|       if (!map)
#  309|           goto quit;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
imlib2-1.12.5/src/lib/image.c:113:18: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
imlib2-1.12.5/src/lib/image.c:516:1: enter_function: entry to '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:526:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:570:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: following 'false' branch (when 'fp' is NULL)...
imlib2-1.12.5/src/lib/image.c:582:14: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:583:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:585:22: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:586:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:588:27: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: following 'false' branch (when 'err == 0')...
imlib2-1.12.5/src/lib/image.c:614:10: call_function: inlined call to '__imlib_ProduceImage' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:615:16: acquire_memory: allocated here
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch (when 'im_file' is non-NULL)...
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:619:9: call_function: calling '__imlib_ImageFileContextPush' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: return_function: returning to '__imlib_LoadImage' from '__imlib_ImageFileContextPush'
imlib2-1.12.5/src/lib/image.c:619:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:620:57: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:620:9: call_function: calling '__imlib_FileContextOpen' from '__imlib_LoadImage'
#  111|       else
#  112|       {
#  113|->         fi->fp = __imlib_FileOpen(fi->name, "rb", &st);
#  114|           if (!fi->fp)
#  115|               return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
imlib2-1.12.5/src/lib/image.c:113:18: warning[-Wanalyzer-malloc-leak]: leak of 'im'
imlib2-1.12.5/src/lib/image.c:516:1: enter_function: entry to '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:526:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:570:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: following 'false' branch (when 'fp' is NULL)...
imlib2-1.12.5/src/lib/image.c:582:14: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:583:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:585:22: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:586:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:588:27: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: following 'false' branch (when 'err == 0')...
imlib2-1.12.5/src/lib/image.c:614:10: call_function: inlined call to '__imlib_ProduceImage' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch (when 'im_file' is non-NULL)...
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:619:9: call_function: calling '__imlib_ImageFileContextPush' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: return_function: returning to '__imlib_LoadImage' from '__imlib_ImageFileContextPush'
imlib2-1.12.5/src/lib/image.c:619:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:620:57: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:620:9: call_function: calling '__imlib_FileContextOpen' from '__imlib_LoadImage'
#  111|       else
#  112|       {
#  113|->         fi->fp = __imlib_FileOpen(fi->name, "rb", &st);
#  114|           if (!fi->fp)
#  115|               return -1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def135]
imlib2-1.12.5/src/lib/image.c:164:1: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
imlib2-1.12.5/src/lib/image.c:900:1: enter_function: entry to '__imlib_SaveImage'
imlib2-1.12.5/src/lib/image.c:907:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:914:38: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:916:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:922:8: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:932:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:935:5: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:935:5: branch_true: following 'true' branch (when 'file' is non-NULL)...
imlib2-1.12.5/src/lib/image.c:935:45: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:935:45: acquire_memory: allocated here
imlib2-1.12.5/src/lib/image.c:935:5: call_function: calling '__imlib_ImageFileContextPush' from '__imlib_SaveImage'
#  162|   
#  163|       return 0;
#  164|-> }
#  165|   
#  166|   static void

Error: GCC_ANALYZER_WARNING (CWE-401): [#def136]
imlib2-1.12.5/src/lib/image.c:164:1: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(file)'
imlib2-1.12.5/src/lib/image.c:759:1: enter_function: entry to '__imlib_LoadEmbedded'
imlib2-1.12.5/src/lib/image.c:764:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:767:5: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:767:5: acquire_memory: allocated here
imlib2-1.12.5/src/lib/image.c:767:5: call_function: calling '__imlib_ImageFileContextPush' from '__imlib_LoadEmbedded'
#  162|   
#  163|       return 0;
#  164|-> }
#  165|   
#  166|   static void

Error: CPPCHECK_WARNING (CWE-476): [#def137]
imlib2-1.12.5/src/lib/image.c:184: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: im
#  182|   
#  183|       im = calloc(1, sizeof(ImlibImage));
#  184|->     im->flags = F_FORMAT_IRRELEVANT;
#  185|   
#  186|       return im;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def138]
imlib2-1.12.5/src/lib/image.c:184:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'im'
imlib2-1.12.5/src/lib/image.c:516:1: enter_function: entry to '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:526:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: following 'false' branch (when 'err == 0')...
imlib2-1.12.5/src/lib/image.c:614:10: call_function: inlined call to '__imlib_ProduceImage' from '__imlib_LoadImage'
#  182|   
#  183|       im = calloc(1, sizeof(ImlibImage));
#  184|->     im->flags = F_FORMAT_IRRELEVANT;
#  185|   
#  186|       return im;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def139]
imlib2-1.12.5/src/lib/image.c:194:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
imlib2-1.12.5/src/lib/image.c:516:1: enter_function: entry to '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:526:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: following 'false' branch (when 'err == 0')...
imlib2-1.12.5/src/lib/image.c:614:10: call_function: inlined call to '__imlib_ProduceImage' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:615:16: acquire_memory: allocated here
imlib2-1.12.5/src/lib/image.c:619:9: branch_true: following 'true' branch (when 'im_file' is NULL)...
imlib2-1.12.5/src/lib/image.c:619:9: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:619:9: call_function: calling '__imlib_ImageFileContextPush' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: return_function: returning to '__imlib_LoadImage' from '__imlib_ImageFileContextPush'
imlib2-1.12.5/src/lib/image.c:619:8: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:622:20: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:623:9: call_function: calling '__imlib_ConsumeImage' from '__imlib_LoadImage'
#  192|   {
#  193|   #ifdef BUILD_X11
#  194|->     __imlib_PixmapUnrefImage(im);
#  195|   #endif
#  196|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def140]
imlib2-1.12.5/src/lib/image.c:194:5: warning[-Wanalyzer-malloc-leak]: leak of 'im'
imlib2-1.12.5/src/lib/image.c:516:1: enter_function: entry to '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:526:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: following 'false' branch (when 'err == 0')...
imlib2-1.12.5/src/lib/image.c:614:10: call_function: inlined call to '__imlib_ProduceImage' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: branch_true: following 'true' branch (when 'im_file' is NULL)...
imlib2-1.12.5/src/lib/image.c:619:9: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:619:9: call_function: calling '__imlib_ImageFileContextPush' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: return_function: returning to '__imlib_LoadImage' from '__imlib_ImageFileContextPush'
imlib2-1.12.5/src/lib/image.c:619:8: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:622:20: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:623:9: call_function: calling '__imlib_ConsumeImage' from '__imlib_LoadImage'
#  192|   {
#  193|   #ifdef BUILD_X11
#  194|->     __imlib_PixmapUnrefImage(im);
#  195|   #endif
#  196|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def141]
imlib2-1.12.5/src/lib/image.c:197:5: warning[-Wanalyzer-malloc-leak]: leak of 'im'
imlib2-1.12.5/src/lib/image.c:516:1: enter_function: entry to '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:526:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:570:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: following 'false' branch (when 'fp' is NULL)...
imlib2-1.12.5/src/lib/image.c:582:14: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:583:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:585:22: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:586:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:588:27: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: following 'false' branch (when 'err == 0')...
imlib2-1.12.5/src/lib/image.c:614:10: call_function: inlined call to '__imlib_ProduceImage' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: call_function: calling '__imlib_ImageFileContextPush' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: return_function: returning to '__imlib_LoadImage' from '__imlib_ImageFileContextPush'
imlib2-1.12.5/src/lib/image.c:619:8: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:622:20: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:623:9: call_function: calling '__imlib_ConsumeImage' from '__imlib_LoadImage'
#  195|   #endif
#  196|   
#  197|->     __imlib_FreeAllTags(im);
#  198|   
#  199|       if (im->file && (!im->fi || im->fi->name != im->file))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def142]
imlib2-1.12.5/src/lib/image.c:429:17: warning[-Wanalyzer-null-dereference]: dereference of NULL 'p'
imlib2-1.12.5/src/lib/image.c:737:1: enter_function: entry to '__imlib_LoadImageData'
imlib2-1.12.5/src/lib/image.c:741:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:745:10: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:745:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:748:11: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:748:11: call_function: calling '__imlib_FileContextOpen' from '__imlib_LoadImageData'
imlib2-1.12.5/src/lib/image.c:748:11: return_function: returning to '__imlib_LoadImageData' from '__imlib_FileContextOpen'
imlib2-1.12.5/src/lib/image.c:749:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:751:36: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:751:11: call_function: calling '__imlib_LoadImageWrapper' from '__imlib_LoadImageData'
#  427|           for (x = 0; x < im->w; x++, p++)
#  428|           {
#  429|->             if (A_VAL(p) != 0xff)
#  430|                   return;
#  431|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def143]
imlib2-1.12.5/src/lib/image.c:455:10: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
imlib2-1.12.5/src/lib/image.c:516:1: enter_function: entry to '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:526:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:570:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: following 'false' branch (when 'fp' is NULL)...
imlib2-1.12.5/src/lib/image.c:582:14: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:583:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:585:22: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:586:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:588:27: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:597:13: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:599:13: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:599:13: branch_true: following 'true' branch (when 'fp' is non-NULL)...
imlib2-1.12.5/src/lib/image.c:599:20: call_function: inlined call to '__imlib_StatIsDir' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:599:14: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: following 'false' branch (when 'err == 0')...
imlib2-1.12.5/src/lib/image.c:614:10: call_function: inlined call to '__imlib_ProduceImage' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:615:16: acquire_memory: allocated here
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch (when 'im_file' is non-NULL)...
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:619:9: call_function: calling '__imlib_ImageFileContextPush' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: return_function: returning to '__imlib_LoadImage' from '__imlib_ImageFileContextPush'
imlib2-1.12.5/src/lib/image.c:619:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:620:57: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:620:9: call_function: calling '__imlib_FileContextOpen' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:620:9: return_function: returning to '__imlib_LoadImage' from '__imlib_FileContextOpen'
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:627:23: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:633:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:640:42: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:647:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:668:9: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:669:22: call_function: calling '__imlib_LoadImageWrapper' from '__imlib_LoadImage'
#  453|           im->format = strdup(l->name);
#  454|   
#  455|->     rc = l->module->load(im, load_data);
#  456|   
#  457|       DP("%s: %-4s: %s: Elapsed time: %.3f ms\n", __func__,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def144]
imlib2-1.12.5/src/lib/image.c:455:10: warning[-Wanalyzer-malloc-leak]: leak of 'im'
imlib2-1.12.5/src/lib/image.c:516:1: enter_function: entry to '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:526:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:570:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: following 'false' branch (when 'fp' is NULL)...
imlib2-1.12.5/src/lib/image.c:582:14: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:583:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:585:22: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:586:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:588:27: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:597:13: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:599:13: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:599:13: branch_true: following 'true' branch (when 'fp' is non-NULL)...
imlib2-1.12.5/src/lib/image.c:599:20: call_function: inlined call to '__imlib_StatIsDir' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:599:14: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: following 'false' branch (when 'err == 0')...
imlib2-1.12.5/src/lib/image.c:614:10: call_function: inlined call to '__imlib_ProduceImage' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch (when 'im_file' is non-NULL)...
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:619:9: call_function: calling '__imlib_ImageFileContextPush' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: return_function: returning to '__imlib_LoadImage' from '__imlib_ImageFileContextPush'
imlib2-1.12.5/src/lib/image.c:619:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:620:57: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:620:9: call_function: calling '__imlib_FileContextOpen' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:620:9: return_function: returning to '__imlib_LoadImage' from '__imlib_FileContextOpen'
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:627:23: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:633:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:640:42: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:647:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:668:9: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:669:22: call_function: calling '__imlib_LoadImageWrapper' from '__imlib_LoadImage'
#  453|           im->format = strdup(l->name);
#  454|   
#  455|->     rc = l->module->load(im, load_data);
#  456|   
#  457|       DP("%s: %-4s: %s: Elapsed time: %.3f ms\n", __func__,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def145]
imlib2-1.12.5/src/lib/image.c:629:19: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
imlib2-1.12.5/src/lib/image.c:516:1: enter_function: entry to '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:526:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:570:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: following 'false' branch (when 'fp' is NULL)...
imlib2-1.12.5/src/lib/image.c:582:14: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:583:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:585:22: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:586:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:588:27: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: following 'false' branch (when 'err == 0')...
imlib2-1.12.5/src/lib/image.c:614:10: call_function: inlined call to '__imlib_ProduceImage' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:615:16: acquire_memory: allocated here
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch (when 'im_file' is non-NULL)...
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:619:9: call_function: calling '__imlib_ImageFileContextPush' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: return_function: returning to '__imlib_LoadImage' from '__imlib_ImageFileContextPush'
imlib2-1.12.5/src/lib/image.c:619:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:620:57: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:620:9: call_function: calling '__imlib_FileContextOpen' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:620:9: return_function: returning to '__imlib_LoadImage' from '__imlib_FileContextOpen'
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:627:23: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:629:19: throw: if '__imlib_StatModDate' throws an exception...
imlib2-1.12.5/src/lib/image.c:629:19: danger: '<unknown>' leaks here; was allocated at [(15)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/14)
#  627|       im->fi->keep_fp = ila->fp != NULL;
#  628|   
#  629|->     im->moddate = __imlib_StatModDate(&st);
#  630|   
#  631|       im->data_memory_func = imlib_context_get_image_data_memory_function();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def146]
imlib2-1.12.5/src/lib/image.c:629:19: warning[-Wanalyzer-malloc-leak]: leak of 'im'
imlib2-1.12.5/src/lib/image.c:516:1: enter_function: entry to '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:526:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:570:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: following 'false' branch (when 'fp' is NULL)...
imlib2-1.12.5/src/lib/image.c:582:14: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:583:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:585:22: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:586:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:588:27: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: following 'false' branch (when 'err == 0')...
imlib2-1.12.5/src/lib/image.c:614:10: call_function: inlined call to '__imlib_ProduceImage' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch (when 'im_file' is non-NULL)...
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:619:9: call_function: calling '__imlib_ImageFileContextPush' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: return_function: returning to '__imlib_LoadImage' from '__imlib_ImageFileContextPush'
imlib2-1.12.5/src/lib/image.c:619:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:620:57: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:620:9: call_function: calling '__imlib_FileContextOpen' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:620:9: return_function: returning to '__imlib_LoadImage' from '__imlib_FileContextOpen'
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:627:23: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:629:19: throw: if '__imlib_StatModDate' throws an exception...
imlib2-1.12.5/src/lib/image.c:629:19: danger: 'im' leaks here; was allocated at [(15)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/14)
#  627|       im->fi->keep_fp = ila->fp != NULL;
#  628|   
#  629|->     im->moddate = __imlib_StatModDate(&st);
#  630|   
#  631|       im->data_memory_func = imlib_context_get_image_data_memory_function();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def147]
imlib2-1.12.5/src/lib/image.c:631:28: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
imlib2-1.12.5/src/lib/image.c:516:1: enter_function: entry to '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:526:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:570:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: following 'false' branch (when 'fp' is NULL)...
imlib2-1.12.5/src/lib/image.c:582:14: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:583:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:585:22: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:586:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:588:27: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: following 'false' branch (when 'err == 0')...
imlib2-1.12.5/src/lib/image.c:614:10: call_function: inlined call to '__imlib_ProduceImage' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:615:16: acquire_memory: allocated here
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch (when 'im_file' is non-NULL)...
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:619:9: call_function: calling '__imlib_ImageFileContextPush' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: return_function: returning to '__imlib_LoadImage' from '__imlib_ImageFileContextPush'
imlib2-1.12.5/src/lib/image.c:619:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:620:57: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:620:9: call_function: calling '__imlib_FileContextOpen' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:620:9: return_function: returning to '__imlib_LoadImage' from '__imlib_FileContextOpen'
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:627:23: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:631:28: throw: if 'imlib_context_get_image_data_memory_function' throws an exception...
imlib2-1.12.5/src/lib/image.c:631:28: danger: '<unknown>' leaks here; was allocated at [(15)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/14)
#  629|       im->moddate = __imlib_StatModDate(&st);
#  630|   
#  631|->     im->data_memory_func = imlib_context_get_image_data_memory_function();
#  632|   
#  633|       if (ila->pfunc)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def148]
imlib2-1.12.5/src/lib/image.c:631:28: warning[-Wanalyzer-malloc-leak]: leak of 'im'
imlib2-1.12.5/src/lib/image.c:516:1: enter_function: entry to '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:526:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:570:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: following 'false' branch (when 'fp' is NULL)...
imlib2-1.12.5/src/lib/image.c:582:14: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:583:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:585:22: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:586:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:588:27: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: following 'false' branch (when 'err == 0')...
imlib2-1.12.5/src/lib/image.c:614:10: call_function: inlined call to '__imlib_ProduceImage' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch (when 'im_file' is non-NULL)...
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:619:9: call_function: calling '__imlib_ImageFileContextPush' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: return_function: returning to '__imlib_LoadImage' from '__imlib_ImageFileContextPush'
imlib2-1.12.5/src/lib/image.c:619:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:620:57: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:620:9: call_function: calling '__imlib_FileContextOpen' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:620:9: return_function: returning to '__imlib_LoadImage' from '__imlib_FileContextOpen'
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:627:23: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:631:28: throw: if 'imlib_context_get_image_data_memory_function' throws an exception...
imlib2-1.12.5/src/lib/image.c:631:28: danger: 'im' leaks here; was allocated at [(15)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/14)
#  629|       im->moddate = __imlib_StatModDate(&st);
#  630|   
#  631|->     im->data_memory_func = imlib_context_get_image_data_memory_function();
#  632|   
#  633|       if (ila->pfunc)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def149]
imlib2-1.12.5/src/lib/image.c:640:19: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
imlib2-1.12.5/src/lib/image.c:516:1: enter_function: entry to '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:526:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:570:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: following 'false' branch (when 'fp' is NULL)...
imlib2-1.12.5/src/lib/image.c:582:14: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:583:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:585:22: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:586:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:588:27: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: following 'false' branch (when 'err == 0')...
imlib2-1.12.5/src/lib/image.c:614:10: call_function: inlined call to '__imlib_ProduceImage' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:615:16: acquire_memory: allocated here
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch (when 'im_file' is non-NULL)...
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:619:9: call_function: calling '__imlib_ImageFileContextPush' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: return_function: returning to '__imlib_LoadImage' from '__imlib_ImageFileContextPush'
imlib2-1.12.5/src/lib/image.c:619:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:620:57: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:620:9: call_function: calling '__imlib_FileContextOpen' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:620:9: return_function: returning to '__imlib_LoadImage' from '__imlib_FileContextOpen'
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:627:23: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:633:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:640:42: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:640:19: throw: if '__imlib_FindBestLoader' throws an exception...
imlib2-1.12.5/src/lib/image.c:640:19: danger: '<unknown>' leaks here; was allocated at [(15)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/14)
#  638|   
#  639|       /* take a guess by extension on the best loader to use */
#  640|->     best_loader = __imlib_FindBestLoader(im->fi->name, NULL, 0);
#  641|   
#  642|       loader_ret = LOAD_FAIL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def150]
imlib2-1.12.5/src/lib/image.c:640:19: warning[-Wanalyzer-malloc-leak]: leak of 'im'
imlib2-1.12.5/src/lib/image.c:516:1: enter_function: entry to '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:526:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:570:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: following 'false' branch (when 'fp' is NULL)...
imlib2-1.12.5/src/lib/image.c:582:14: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:583:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:585:22: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:586:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:588:27: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: following 'false' branch (when 'err == 0')...
imlib2-1.12.5/src/lib/image.c:614:10: call_function: inlined call to '__imlib_ProduceImage' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch (when 'im_file' is non-NULL)...
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:619:9: call_function: calling '__imlib_ImageFileContextPush' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: return_function: returning to '__imlib_LoadImage' from '__imlib_ImageFileContextPush'
imlib2-1.12.5/src/lib/image.c:619:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:620:57: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:620:9: call_function: calling '__imlib_FileContextOpen' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:620:9: return_function: returning to '__imlib_LoadImage' from '__imlib_FileContextOpen'
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:627:23: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:633:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:640:42: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:640:19: throw: if '__imlib_FindBestLoader' throws an exception...
imlib2-1.12.5/src/lib/image.c:640:19: danger: 'im' leaks here; was allocated at [(15)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/14)
#  638|   
#  639|       /* take a guess by extension on the best loader to use */
#  640|->     best_loader = __imlib_FindBestLoader(im->fi->name, NULL, 0);
#  641|   
#  642|       loader_ret = LOAD_FAIL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def151]
imlib2-1.12.5/src/lib/image.c:691:17: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
imlib2-1.12.5/src/lib/image.c:516:1: enter_function: entry to '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:526:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:570:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: following 'false' branch (when 'fp' is NULL)...
imlib2-1.12.5/src/lib/image.c:582:14: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:583:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:585:22: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:586:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:588:27: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:597:13: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:599:13: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:599:13: branch_true: following 'true' branch (when 'fp' is non-NULL)...
imlib2-1.12.5/src/lib/image.c:599:20: call_function: inlined call to '__imlib_StatIsDir' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:599:14: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: following 'false' branch (when 'err == 0')...
imlib2-1.12.5/src/lib/image.c:614:10: call_function: inlined call to '__imlib_ProduceImage' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:615:16: acquire_memory: allocated here
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch (when 'im_file' is non-NULL)...
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:619:9: call_function: calling '__imlib_ImageFileContextPush' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: return_function: returning to '__imlib_LoadImage' from '__imlib_ImageFileContextPush'
imlib2-1.12.5/src/lib/image.c:619:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:620:57: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:620:9: call_function: calling '__imlib_FileContextOpen' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:620:9: return_function: returning to '__imlib_LoadImage' from '__imlib_FileContextOpen'
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:627:23: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:633:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:640:42: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:647:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:668:9: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:669:22: call_function: calling '__imlib_LoadImageWrapper' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:669:22: return_function: returning to '__imlib_LoadImage' from '__imlib_LoadImageWrapper'
imlib2-1.12.5/src/lib/image.c:689:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:691:17: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:691:17: throw: if 'fflush' throws an exception...
imlib2-1.12.5/src/lib/image.c:691:17: danger: '<unknown>' leaks here; was allocated at [(22)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/21)
#  689|               if (im->fi->fp)
#  690|               {
#  691|->                 fflush(im->fi->fp);
#  692|                   rewind(im->fi->fp);
#  693|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def152]
imlib2-1.12.5/src/lib/image.c:691:17: warning[-Wanalyzer-malloc-leak]: leak of 'im'
imlib2-1.12.5/src/lib/image.c:516:1: enter_function: entry to '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:526:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:570:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: following 'false' branch (when 'fp' is NULL)...
imlib2-1.12.5/src/lib/image.c:582:14: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:583:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:585:22: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:586:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:588:27: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:597:13: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:599:13: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:599:13: branch_true: following 'true' branch (when 'fp' is non-NULL)...
imlib2-1.12.5/src/lib/image.c:599:20: call_function: inlined call to '__imlib_StatIsDir' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:599:14: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: following 'false' branch (when 'err == 0')...
imlib2-1.12.5/src/lib/image.c:614:10: call_function: inlined call to '__imlib_ProduceImage' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch (when 'im_file' is non-NULL)...
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:619:9: call_function: calling '__imlib_ImageFileContextPush' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: return_function: returning to '__imlib_LoadImage' from '__imlib_ImageFileContextPush'
imlib2-1.12.5/src/lib/image.c:619:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:620:57: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:620:9: call_function: calling '__imlib_FileContextOpen' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:620:9: return_function: returning to '__imlib_LoadImage' from '__imlib_FileContextOpen'
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:627:23: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:633:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:640:42: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:647:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:668:9: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:669:22: call_function: calling '__imlib_LoadImageWrapper' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:669:22: return_function: returning to '__imlib_LoadImage' from '__imlib_LoadImageWrapper'
imlib2-1.12.5/src/lib/image.c:689:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:691:17: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:691:17: throw: if 'fflush' throws an exception...
imlib2-1.12.5/src/lib/image.c:691:17: danger: 'im' leaks here; was allocated at [(22)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/21)
#  689|               if (im->fi->fp)
#  690|               {
#  691|->                 fflush(im->fi->fp);
#  692|                   rewind(im->fi->fp);
#  693|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def153]
imlib2-1.12.5/src/lib/image.c:692:17: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
imlib2-1.12.5/src/lib/image.c:516:1: enter_function: entry to '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:526:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:570:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: following 'false' branch (when 'fp' is NULL)...
imlib2-1.12.5/src/lib/image.c:582:14: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:583:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:585:22: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:586:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:588:27: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:597:13: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:599:13: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:599:13: branch_true: following 'true' branch (when 'fp' is non-NULL)...
imlib2-1.12.5/src/lib/image.c:599:20: call_function: inlined call to '__imlib_StatIsDir' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:599:14: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: following 'false' branch (when 'err == 0')...
imlib2-1.12.5/src/lib/image.c:614:10: call_function: inlined call to '__imlib_ProduceImage' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:615:16: acquire_memory: allocated here
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch (when 'im_file' is non-NULL)...
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:619:9: call_function: calling '__imlib_ImageFileContextPush' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: return_function: returning to '__imlib_LoadImage' from '__imlib_ImageFileContextPush'
imlib2-1.12.5/src/lib/image.c:619:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:620:57: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:620:9: call_function: calling '__imlib_FileContextOpen' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:620:9: return_function: returning to '__imlib_LoadImage' from '__imlib_FileContextOpen'
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:627:23: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:633:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:640:42: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:647:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:668:9: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:669:22: call_function: calling '__imlib_LoadImageWrapper' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:669:22: return_function: returning to '__imlib_LoadImage' from '__imlib_LoadImageWrapper'
imlib2-1.12.5/src/lib/image.c:689:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:691:17: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:692:17: throw: if 'rewind' throws an exception...
imlib2-1.12.5/src/lib/image.c:692:17: danger: '<unknown>' leaks here; was allocated at [(22)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/21)
#  690|               {
#  691|                   fflush(im->fi->fp);
#  692|->                 rewind(im->fi->fp);
#  693|               }
#  694|               continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def154]
imlib2-1.12.5/src/lib/image.c:692:17: warning[-Wanalyzer-malloc-leak]: leak of 'im'
imlib2-1.12.5/src/lib/image.c:516:1: enter_function: entry to '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:526:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:570:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:576:13: branch_false: following 'false' branch (when 'fp' is NULL)...
imlib2-1.12.5/src/lib/image.c:582:14: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:583:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:585:22: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:586:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:588:27: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:597:13: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:599:13: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:599:13: branch_true: following 'true' branch (when 'fp' is non-NULL)...
imlib2-1.12.5/src/lib/image.c:599:20: call_function: inlined call to '__imlib_StatIsDir' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:599:14: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:602:8: branch_false: following 'false' branch (when 'err == 0')...
imlib2-1.12.5/src/lib/image.c:614:10: call_function: inlined call to '__imlib_ProduceImage' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch (when 'im_file' is non-NULL)...
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:619:9: call_function: calling '__imlib_ImageFileContextPush' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:619:9: return_function: returning to '__imlib_LoadImage' from '__imlib_ImageFileContextPush'
imlib2-1.12.5/src/lib/image.c:619:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:620:57: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:620:9: call_function: calling '__imlib_FileContextOpen' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:620:9: return_function: returning to '__imlib_LoadImage' from '__imlib_FileContextOpen'
imlib2-1.12.5/src/lib/image.c:619:9: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:627:23: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:633:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image.c:640:42: branch_false: ...to here
imlib2-1.12.5/src/lib/image.c:647:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:668:9: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:669:22: call_function: calling '__imlib_LoadImageWrapper' from '__imlib_LoadImage'
imlib2-1.12.5/src/lib/image.c:669:22: return_function: returning to '__imlib_LoadImage' from '__imlib_LoadImageWrapper'
imlib2-1.12.5/src/lib/image.c:689:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/image.c:691:17: branch_true: ...to here
imlib2-1.12.5/src/lib/image.c:692:17: throw: if 'rewind' throws an exception...
imlib2-1.12.5/src/lib/image.c:692:17: danger: 'im' leaks here; was allocated at [(22)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/21)
#  690|               {
#  691|                   fflush(im->fi->fp);
#  692|->                 rewind(im->fi->fp);
#  693|               }
#  694|               continue;

Error: CPPCHECK_WARNING (CWE-476): [#def155]
imlib2-1.12.5/src/lib/image_tags.c:26: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: t
#   24|       t = malloc(sizeof(ImlibImageTag));
#   25|       /* fill it int */
#   26|->     t->key = strdup(key);
#   27|       t->val = val;
#   28|       t->data = data;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def156]
imlib2-1.12.5/src/lib/image_tags.c:26:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 't'
imlib2-1.12.5/src/lib/image_tags.c:17:8: branch_false: following 'false' branch (when 'key' is non-NULL)...
imlib2-1.12.5/src/lib/image_tags.c:21:14: branch_false: ...to here
imlib2-1.12.5/src/lib/image_tags.c:21:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/image_tags.c:24:9: branch_false: ...to here
imlib2-1.12.5/src/lib/image_tags.c:24:9: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/image_tags.c:26:5: danger: 't' could be NULL: unchecked value from [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   24|       t = malloc(sizeof(ImlibImageTag));
#   25|       /* fill it int */
#   26|->     t->key = strdup(key);
#   27|       t->val = val;
#   28|       t->data = data;

Error: CPPCHECK_WARNING (CWE-476): [#def157]
imlib2-1.12.5/src/lib/image_tags.c:27: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: t
#   25|       /* fill it int */
#   26|       t->key = strdup(key);
#   27|->     t->val = val;
#   28|       t->data = data;
#   29|       t->destructor = destructor;

Error: CPPCHECK_WARNING (CWE-476): [#def158]
imlib2-1.12.5/src/lib/image_tags.c:28: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: t
#   26|       t->key = strdup(key);
#   27|       t->val = val;
#   28|->     t->data = data;
#   29|       t->destructor = destructor;
#   30|       t->next = im->tags;

Error: CPPCHECK_WARNING (CWE-476): [#def159]
imlib2-1.12.5/src/lib/image_tags.c:29: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: t
#   27|       t->val = val;
#   28|       t->data = data;
#   29|->     t->destructor = destructor;
#   30|       t->next = im->tags;
#   31|       /* prepend it to the list of tags */

Error: CPPCHECK_WARNING (CWE-476): [#def160]
imlib2-1.12.5/src/lib/image_tags.c:30: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: t
#   28|       t->data = data;
#   29|       t->destructor = destructor;
#   30|->     t->next = im->tags;
#   31|       /* prepend it to the list of tags */
#   32|       im->tags = t;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def161]
imlib2-1.12.5/src/lib/modules.c:30:17: warning[-Wanalyzer-malloc-leak]: leak of '*pp'
imlib2-1.12.5/src/lib/modules.c:63:1: enter_function: entry to '__imlib_PathToLoaders'
imlib2-1.12.5/src/lib/modules.c:67:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/modules.c:70:14: branch_false: ...to here
imlib2-1.12.5/src/lib/modules.c:70:14: call_function: calling '_module_paths' from '__imlib_PathToLoaders'
#   28|                   free(*pp);
#   29|                   snprintf(buf, sizeof(buf), "%s/%s", PACKAGE_LIB_DIR, mdir);
#   30|->                 *pp = strdup(buf);
#   31|               }
#   32|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def162]
imlib2-1.12.5/src/lib/modules.c:111:13: warning[-Wanalyzer-malloc-leak]: leak of 'list'
imlib2-1.12.5/src/lib/modules.c:104:8: branch_false: following 'false' branch (when 'ppath' is non-NULL)...
imlib2-1.12.5/src/lib/modules.c:104:8: branch_false: ...to here
imlib2-1.12.5/src/lib/modules.c:109:22: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/modules.c:111:13: branch_true: ...to here
imlib2-1.12.5/src/lib/modules.c:118:12: branch_true: following 'true' branch (when 'list' is non-NULL)...
imlib2-1.12.5/src/lib/modules.c:118:12: branch_true: ...to here
imlib2-1.12.5/src/lib/modules.c:120:25: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/modules.c:122:39: branch_true: ...to here
imlib2-1.12.5/src/lib/modules.c:122:20: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/modules.c:122:20: branch_false: ...to here
imlib2-1.12.5/src/lib/modules.c:131:12: branch_false: following 'false' branch (when 'list' is non-NULL)...
imlib2-1.12.5/src/lib/modules.c:109:27: branch_false: ...to here
imlib2-1.12.5/src/lib/modules.c:109:22: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/modules.c:111:13: branch_true: ...to here
imlib2-1.12.5/src/lib/modules.c:111:13: throw: if '__imlib_FileDir' throws an exception...
imlib2-1.12.5/src/lib/modules.c:111:13: danger: 'list' leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  109|       for (pp = ppath; *pp; pp++)
#  110|       {
#  111|->         l = __imlib_FileDir(*pp, &num);
#  112|           if (!l)
#  113|               continue;

Error: CPPCHECK_WARNING (CWE-401): [#def163]
imlib2-1.12.5/src/lib/modules.c:117: error[memleakOnRealloc]: Common realloc mistake: 'list' nulled but not freed upon failure
#  115|               continue;
#  116|   
#  117|->         list = realloc(list, (ntot + num) * sizeof(char *));
#  118|           if (list)
#  119|           {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def164]
imlib2-1.12.5/src/lib/modules.c:130:9: warning[-Wanalyzer-malloc-leak]: leak of 'list'
imlib2-1.12.5/src/lib/modules.c:104:8: branch_false: following 'false' branch (when 'ppath' is non-NULL)...
imlib2-1.12.5/src/lib/modules.c:104:8: branch_false: ...to here
imlib2-1.12.5/src/lib/modules.c:109:22: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/modules.c:111:13: branch_true: ...to here
imlib2-1.12.5/src/lib/modules.c:118:12: branch_true: following 'true' branch (when 'list' is non-NULL)...
imlib2-1.12.5/src/lib/modules.c:118:12: branch_true: ...to here
imlib2-1.12.5/src/lib/modules.c:120:25: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/modules.c:122:39: branch_true: ...to here
imlib2-1.12.5/src/lib/modules.c:122:20: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/modules.c:122:20: branch_false: ...to here
imlib2-1.12.5/src/lib/modules.c:130:9: throw: if '__imlib_FileFreeDirList' throws an exception...
imlib2-1.12.5/src/lib/modules.c:130:9: danger: 'list' leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  128|               }
#  129|           }
#  130|->         __imlib_FileFreeDirList(l, num);
#  131|           if (!list)
#  132|               goto done;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def165]
imlib2-1.12.5/src/lib/object.c:151:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
imlib2-1.12.5/src/lib/object.c:93:1: enter_function: entry to '__imlib_hash_add'
imlib2-1.12.5/src/lib/object.c:100:8: branch_false: following 'false' branch (when 'hash' is non-NULL)...
imlib2-1.12.5/src/lib/object.c:110:16: branch_false: ...to here
imlib2-1.12.5/src/lib/object.c:110:8: branch_false: following 'false' branch (when 'el' is non-NULL)...
imlib2-1.12.5/src/lib/object.c:121:8: branch_false: ...to here
imlib2-1.12.5/src/lib/object.c:121:8: branch_true: following 'true' branch (when 'key' is non-NULL)...
imlib2-1.12.5/src/lib/object.c:123:19: branch_true: ...to here
imlib2-1.12.5/src/lib/object.c:123:19: acquire_memory: allocated here
imlib2-1.12.5/src/lib/object.c:124:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/object.c:130:20: call_function: inlined call to '__imlib_hash_gen' from '__imlib_hash_add'
imlib2-1.12.5/src/lib/object.c:141:9: call_function: inlined call to '__imlib_object_list_prepend' from '__imlib_hash_add'
imlib2-1.12.5/src/lib/object.c:143:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/object.c:151:5: branch_false: ...to here
imlib2-1.12.5/src/lib/object.c:151:5: danger: '<unknown>' leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#  149|       }
#  150|   
#  151|->     hash->population++;
#  152|   
#  153|       return hash;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def166]
imlib2-1.12.5/src/lib/rgbadraw.c:148:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'to'
imlib2-1.12.5/src/lib/rgbadraw.c:93:12: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/rgbadraw.c:144:21: branch_true: following 'true' branch (when 'x >= 0')...
imlib2-1.12.5/src/lib/rgbadraw.c:144:21: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:146:25: branch_true: following 'true' branch (when 'y >= 0')...
imlib2-1.12.5/src/lib/rgbadraw.c:148:19: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:148:13: danger: 'to' could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  146|           for (y = im->h; --y >= 0;)
#  147|           {
#  148|->             *to = *from;
#  149|               from++;
#  150|               to += w;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def167]
imlib2-1.12.5/src/lib/rgbadraw.c:154:5: warning[-Wanalyzer-malloc-leak]: leak of 'to'
imlib2-1.12.5/src/lib/rgbadraw.c:93:12: acquire_memory: allocated here
imlib2-1.12.5/src/lib/rgbadraw.c:144:21: branch_false: following 'false' branch (when 'x < 0')...
imlib2-1.12.5/src/lib/rgbadraw.c:154:5: branch_false: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:154:5: throw: if '__imlib_ReplaceData' throws an exception...
imlib2-1.12.5/src/lib/rgbadraw.c:154:5: danger: 'to' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  152|           to += hw;
#  153|       }
#  154|->     __imlib_ReplaceData(im, data);
#  155|   }
#  156|   

Error: CPPCHECK_WARNING (CWE-682): [#def168]
imlib2-1.12.5/src/lib/rgbadraw.c:185: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  183|               mh = im->h - my;
#  184|   
#  185|->         p1 = data + (y * im->w);
#  186|           memset(as, 0, im->w * sizeof(int));
#  187|           memset(rs, 0, im->w * sizeof(int));

Error: CPPCHECK_WARNING (CWE-476): [#def169]
imlib2-1.12.5/src/lib/rgbadraw.c:186: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: as
#  184|   
#  185|           p1 = data + (y * im->w);
#  186|->         memset(as, 0, im->w * sizeof(int));
#  187|           memset(rs, 0, im->w * sizeof(int));
#  188|           memset(gs, 0, im->w * sizeof(int));

Error: GCC_ANALYZER_WARNING (CWE-688): [#def170]
imlib2-1.12.5/src/lib/rgbadraw.c:186:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'as' where non-null expected
imlib2-1.12.5/src/lib/rgbadraw.c:165:8: branch_false: following 'false' branch (when 'rad > 0')...
imlib2-1.12.5/src/lib/rgbadraw.c:167:19: branch_false: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:168:10: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/rgbadraw.c:173:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:175:9: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:177:12: branch_true: following 'true' branch (when 'my < 0')...
imlib2-1.12.5/src/lib/rgbadraw.c:179:13: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:182:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:185:21: branch_false: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:186:9: danger: argument 1 ('as') from [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
#  184|   
#  185|           p1 = data + (y * im->w);
#  186|->         memset(as, 0, im->w * sizeof(int));
#  187|           memset(rs, 0, im->w * sizeof(int));
#  188|           memset(gs, 0, im->w * sizeof(int));

Error: CPPCHECK_WARNING (CWE-476): [#def171]
imlib2-1.12.5/src/lib/rgbadraw.c:187: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rs
#  185|           p1 = data + (y * im->w);
#  186|           memset(as, 0, im->w * sizeof(int));
#  187|->         memset(rs, 0, im->w * sizeof(int));
#  188|           memset(gs, 0, im->w * sizeof(int));
#  189|           memset(bs, 0, im->w * sizeof(int));

Error: GCC_ANALYZER_WARNING (CWE-688): [#def172]
imlib2-1.12.5/src/lib/rgbadraw.c:187:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'rs' where non-null expected
imlib2-1.12.5/src/lib/rgbadraw.c:165:8: branch_false: following 'false' branch (when 'rad > 0')...
imlib2-1.12.5/src/lib/rgbadraw.c:167:19: branch_false: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:169:10: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/rgbadraw.c:173:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:175:9: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:177:12: branch_true: following 'true' branch (when 'my < 0')...
imlib2-1.12.5/src/lib/rgbadraw.c:179:13: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:182:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:185:21: branch_false: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:187:9: danger: argument 1 ('rs') from [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
#  185|           p1 = data + (y * im->w);
#  186|           memset(as, 0, im->w * sizeof(int));
#  187|->         memset(rs, 0, im->w * sizeof(int));
#  188|           memset(gs, 0, im->w * sizeof(int));
#  189|           memset(bs, 0, im->w * sizeof(int));

Error: CPPCHECK_WARNING (CWE-476): [#def173]
imlib2-1.12.5/src/lib/rgbadraw.c:188: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: gs
#  186|           memset(as, 0, im->w * sizeof(int));
#  187|           memset(rs, 0, im->w * sizeof(int));
#  188|->         memset(gs, 0, im->w * sizeof(int));
#  189|           memset(bs, 0, im->w * sizeof(int));
#  190|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def174]
imlib2-1.12.5/src/lib/rgbadraw.c:188:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'gs' where non-null expected
imlib2-1.12.5/src/lib/rgbadraw.c:165:8: branch_false: following 'false' branch (when 'rad > 0')...
imlib2-1.12.5/src/lib/rgbadraw.c:167:19: branch_false: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:170:10: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/rgbadraw.c:173:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:175:9: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:177:12: branch_true: following 'true' branch (when 'my < 0')...
imlib2-1.12.5/src/lib/rgbadraw.c:179:13: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:182:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:185:21: branch_false: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:188:9: danger: argument 1 ('gs') from [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
#  186|           memset(as, 0, im->w * sizeof(int));
#  187|           memset(rs, 0, im->w * sizeof(int));
#  188|->         memset(gs, 0, im->w * sizeof(int));
#  189|           memset(bs, 0, im->w * sizeof(int));
#  190|   

Error: CPPCHECK_WARNING (CWE-476): [#def175]
imlib2-1.12.5/src/lib/rgbadraw.c:189: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: bs
#  187|           memset(rs, 0, im->w * sizeof(int));
#  188|           memset(gs, 0, im->w * sizeof(int));
#  189|->         memset(bs, 0, im->w * sizeof(int));
#  190|   
#  191|           for (yy = 0; yy < mh; yy++)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def176]
imlib2-1.12.5/src/lib/rgbadraw.c:189:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'bs' where non-null expected
imlib2-1.12.5/src/lib/rgbadraw.c:165:8: branch_false: following 'false' branch (when 'rad > 0')...
imlib2-1.12.5/src/lib/rgbadraw.c:167:19: branch_false: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:171:10: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/rgbadraw.c:173:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:175:9: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:177:12: branch_true: following 'true' branch (when 'my < 0')...
imlib2-1.12.5/src/lib/rgbadraw.c:179:13: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:182:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:185:21: branch_false: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:189:9: danger: argument 1 ('bs') from [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
#  187|           memset(rs, 0, im->w * sizeof(int));
#  188|           memset(gs, 0, im->w * sizeof(int));
#  189|->         memset(bs, 0, im->w * sizeof(int));
#  190|   
#  191|           for (yy = 0; yy < mh; yy++)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def177]
imlib2-1.12.5/src/lib/rgbadraw.c:232:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'p1'
imlib2-1.12.5/src/lib/rgbadraw.c:165:8: branch_false: following 'false' branch (when 'rad > 0')...
imlib2-1.12.5/src/lib/rgbadraw.c:167:19: branch_false: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:167:12: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/rgbadraw.c:173:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:175:9: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:177:12: branch_true: following 'true' branch (when 'my < 0')...
imlib2-1.12.5/src/lib/rgbadraw.c:179:13: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:203:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:203:12: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:205:25: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:211:17: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:213:20: branch_true: following 'true' branch (when 'mx < 0')...
imlib2-1.12.5/src/lib/rgbadraw.c:215:21: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:218:20: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:220:17: branch_false: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:221:31: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:228:17: branch_false: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:232:17: danger: 'p1' could be NULL: unchecked value from [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  230|                   g = g / mt;
#  231|                   b = b / mt;
#  232|->                 *p1 = PIXEL_ARGB(a, r, g, b);
#  233|                   p1++;
#  234|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def178]
imlib2-1.12.5/src/lib/rgbadraw.c:244:5: warning[-Wanalyzer-malloc-leak]: leak of 'data'
imlib2-1.12.5/src/lib/rgbadraw.c:165:8: branch_false: following 'false' branch (when 'rad > 0')...
imlib2-1.12.5/src/lib/rgbadraw.c:167:19: branch_false: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:167:12: acquire_memory: allocated here
imlib2-1.12.5/src/lib/rgbadraw.c:173:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:175:9: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:177:12: branch_true: following 'true' branch (when 'my < 0')...
imlib2-1.12.5/src/lib/rgbadraw.c:179:13: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:203:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:203:12: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:205:25: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:211:17: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:213:20: branch_true: following 'true' branch (when 'mx < 0')...
imlib2-1.12.5/src/lib/rgbadraw.c:215:21: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:218:20: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:220:17: branch_false: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:221:31: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:228:17: branch_false: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:205:25: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:173:28: branch_false: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:173:17: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:240:5: branch_false: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:244:5: throw: if '__imlib_ReplaceData' throws an exception...
imlib2-1.12.5/src/lib/rgbadraw.c:244:5: danger: 'data' leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  242|       free(gs);
#  243|       free(bs);
#  244|->     __imlib_ReplaceData(im, data);
#  245|   }
#  246|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def179]
imlib2-1.12.5/src/lib/rgbadraw.c:302:5: warning[-Wanalyzer-malloc-leak]: leak of 'data'
imlib2-1.12.5/src/lib/rgbadraw.c:253:8: branch_false: following 'false' branch (when 'rad != 0')...
imlib2-1.12.5/src/lib/rgbadraw.c:256:19: branch_false: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:256:12: acquire_memory: allocated here
imlib2-1.12.5/src/lib/rgbadraw.c:257:8: branch_false: following 'false' branch (when 'data' is non-NULL)...
imlib2-1.12.5/src/lib/rgbadraw.c:257:8: branch_false: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:302:5: throw: if '__imlib_ReplaceData' throws an exception...
imlib2-1.12.5/src/lib/rgbadraw.c:302:5: danger: 'data' leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  300|       }
#  301|   
#  302|->     __imlib_ReplaceData(im, data);
#  303|   }
#  304|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def180]
imlib2-1.12.5/src/lib/rgbadraw.c:341:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'p'
imlib2-1.12.5/src/lib/rgbadraw.c:312:12: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/rgbadraw.c:315:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:317:19: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:341:13: danger: 'p' could be NULL: unchecked value from [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  339|               tmp = (a - aa) * mix;
#  340|               na = aa + ((tmp + (tmp >> 8) + 0x80) >> 8);
#  341|->             *p = PIXEL_ARGB(na, nr, ng, nb);
#  342|               p++;
#  343|               p1++;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def181]
imlib2-1.12.5/src/lib/rgbadraw.c:369:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'p'
imlib2-1.12.5/src/lib/rgbadraw.c:312:12: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/rgbadraw.c:315:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:317:19: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:320:21: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:347:9: branch_false: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:369:13: danger: 'p' could be NULL: unchecked value from [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  367|               tmp = (a - aa) * mix;
#  368|               na = aa + ((tmp + (tmp >> 8) + 0x80) >> 8);
#  369|->             *p = PIXEL_ARGB(na, nr, ng, nb);
#  370|               p++;
#  371|               p1++;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def182]
imlib2-1.12.5/src/lib/rgbadraw.c:419:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'p'
imlib2-1.12.5/src/lib/rgbadraw.c:384:12: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/rgbadraw.c:386:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/rgbadraw.c:388:14: branch_true: ...to here
imlib2-1.12.5/src/lib/rgbadraw.c:419:13: danger: 'p' could be NULL: unchecked value from [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
#  417|               tmp = (a - aa) * mix;
#  418|               na = aa + ((tmp + (tmp >> 8) + 0x80) >> 8);
#  419|->             *p = PIXEL_ARGB(na, nr, ng, nb);
#  420|               p++;
#  421|               p1++;

Error: CPPCHECK_WARNING (CWE-682): [#def183]
imlib2-1.12.5/src/lib/script.c:46: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#   44|       for (si = so = str;;)
#   45|       {
#   46|->         ch = *si++;
#   47|           if (ch == '"')
#   48|               in_quote = !in_quote;

Error: CPPCHECK_WARNING (CWE-476): [#def184]
imlib2-1.12.5/src/lib/script.c:46: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: si++
#   44|       for (si = so = str;;)
#   45|       {
#   46|->         ch = *si++;
#   47|           if (ch == '"')
#   48|               in_quote = !in_quote;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def185]
imlib2-1.12.5/src/lib/script.c:46:14: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'si'
imlib2-1.12.5/src/lib/script.c:238:1: enter_function: entry to '__imlib_script_parse'
imlib2-1.12.5/src/lib/script.c:245:8: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/script.c:254:21: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/script.c:254:21: call_function: calling '__imlib_stripwhitespace' from '__imlib_script_parse'
#   44|       for (si = so = str;;)
#   45|       {
#   46|->         ch = *si++;
#   47|           if (ch == '"')
#   48|               in_quote = !in_quote;

Error: CPPCHECK_WARNING (CWE-476): [#def186]
imlib2-1.12.5/src/lib/script.c:68: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rstr
#   66|       rstr = calloc(1024, sizeof(char));
#   67|       for (i = start; i <= end; i++)
#   68|->         rstr[i - start] = str[i];
#   69|       return rstr;
#   70|   }

Error: CPPCHECK_WARNING (CWE-476): [#def187]
imlib2-1.12.5/src/lib/script.c:115: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: curtail
#  113|       curtail->next = malloc(sizeof(IVariable));
#  114|       curtail = curtail->next;
#  115|->     curtail->ptr = ptr;
#  116|       curtail->next = NULL;
#  117|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def188]
imlib2-1.12.5/src/lib/script.c:115:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'curtail'
imlib2-1.12.5/src/lib/script.c:238:1: enter_function: entry to '__imlib_script_parse'
imlib2-1.12.5/src/lib/script.c:245:8: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/script.c:256:13: call_function: inlined call to '__imlib_find_string' from '__imlib_script_parse'
imlib2-1.12.5/src/lib/script.c:257:16: branch_true: following 'true' branch (when 'i > 0')...
imlib2-1.12.5/src/lib/script.c:259:13: branch_true: ...to here
imlib2-1.12.5/src/lib/script.c:259:13: call_function: calling '__imlib_script_add_var' from '__imlib_script_parse'
#  113|       curtail->next = malloc(sizeof(IVariable));
#  114|       curtail = curtail->next;
#  115|->     curtail->ptr = ptr;
#  116|       curtail->next = NULL;
#  117|   }

Error: CPPCHECK_WARNING (CWE-476): [#def189]
imlib2-1.12.5/src/lib/script.c:116: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: curtail
#  114|       curtail = curtail->next;
#  115|       curtail->ptr = ptr;
#  116|->     curtail->next = NULL;
#  117|   }
#  118|   

Error: CPPCHECK_WARNING (CWE-476): [#def190]
imlib2-1.12.5/src/lib/script.c:130: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rootptr
#  128|   
#  129|       rootptr = malloc(sizeof(IFunctionParam));
#  130|->     rootptr->key = strdup("NO-KEY");
#  131|       rootptr->type = VAR_CHAR;
#  132|       rootptr->data = strdup("NO-VALUE");

Error: CPPCHECK_WARNING (CWE-476): [#def191]
imlib2-1.12.5/src/lib/script.c:131: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rootptr
#  129|       rootptr = malloc(sizeof(IFunctionParam));
#  130|       rootptr->key = strdup("NO-KEY");
#  131|->     rootptr->type = VAR_CHAR;
#  132|       rootptr->data = strdup("NO-VALUE");
#  133|       rootptr->next = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def192]
imlib2-1.12.5/src/lib/script.c:132: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rootptr
#  130|       rootptr->key = strdup("NO-KEY");
#  131|       rootptr->type = VAR_CHAR;
#  132|->     rootptr->data = strdup("NO-VALUE");
#  133|       rootptr->next = NULL;
#  134|       ptr = rootptr;

Error: CPPCHECK_WARNING (CWE-476): [#def193]
imlib2-1.12.5/src/lib/script.c:133: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rootptr
#  131|       rootptr->type = VAR_CHAR;
#  132|       rootptr->data = strdup("NO-VALUE");
#  133|->     rootptr->next = NULL;
#  134|       ptr = rootptr;
#  135|   

Error: CPPCHECK_WARNING (CWE-476): [#def194]
imlib2-1.12.5/src/lib/script.c:151: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ptr
#  149|               ptr->next = malloc(sizeof(IFunctionParam));
#  150|               ptr = ptr->next;
#  151|->             ptr->key = __imlib_copystr(parameters, start, value_start - 2);
#  152|               value = __imlib_copystr(parameters, value_start, i - 1);
#  153|   #ifdef FDEBUG

Error: CPPCHECK_WARNING (CWE-476): [#def195]
imlib2-1.12.5/src/lib/script.c:184: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ptr
#  182|                   }
#  183|               }
#  184|->             ptr->next = NULL;
#  185|               start = i + 1;
#  186|           }

Error: CPPCHECK_WARNING (CWE-476): [#def196]
imlib2-1.12.5/src/lib/script.c:248: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vars
#  246|       {
#  247|           vars = malloc(sizeof(IVariable));
#  248|->         vars->ptr = NULL;
#  249|           vars->next = NULL;
#  250|           curtail = vars;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def197]
imlib2-1.12.5/src/lib/script.c:248:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'vars'
imlib2-1.12.5/src/lib/script.c:245:8: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/script.c:247:16: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/script.c:248:9: danger: 'malloc(16)' could be NULL: unchecked value from [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  246|       {
#  247|           vars = malloc(sizeof(IVariable));
#  248|->         vars->ptr = NULL;
#  249|           vars->next = NULL;
#  250|           curtail = vars;

Error: CPPCHECK_WARNING (CWE-476): [#def198]
imlib2-1.12.5/src/lib/script.c:249: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: vars
#  247|           vars = malloc(sizeof(IVariable));
#  248|           vars->ptr = NULL;
#  249|->         vars->next = NULL;
#  250|           curtail = vars;
#  251|           current_var = vars;

Error: CPPCHECK_WARNING (CWE-401): [#def199]
imlib2-1.12.5/src/lib/strutils.c:37: error[memleakOnRealloc]: Common realloc mistake: 'lst' nulled but not freed upon failure
#   35|               continue;
#   36|   
#   37|->         lst = realloc(lst, (n + 2) * sizeof(char *));
#   38|   
#   39|           lst[n++] = strndup(s, len);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def200]
imlib2-1.12.5/src/lib/strutils.c:37:15: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
imlib2-1.12.5/src/lib/strutils.c:17:8: branch_false: following 'false' branch (when 'delim != 0')...
imlib2-1.12.5/src/lib/strutils.c:17:8: branch_false: ...to here
imlib2-1.12.5/src/lib/strutils.c:22:19: branch_true: following 'true' branch (when 's' is non-NULL)...
imlib2-1.12.5/src/lib/strutils.c:24:13: branch_true: ...to here
imlib2-1.12.5/src/lib/strutils.c:25:12: branch_true: following 'true' branch (when 'p' is non-NULL)...
imlib2-1.12.5/src/lib/strutils.c:27:19: branch_true: ...to here
imlib2-1.12.5/src/lib/strutils.c:39:20: acquire_memory: allocated here
imlib2-1.12.5/src/lib/strutils.c:22:19: branch_true: following 'true' branch (when 's' is non-NULL)...
imlib2-1.12.5/src/lib/strutils.c:24:13: branch_true: ...to here
imlib2-1.12.5/src/lib/strutils.c:25:12: branch_false: following 'false' branch (when 'p' is NULL)...
imlib2-1.12.5/src/lib/strutils.c:32:19: branch_false: ...to here
imlib2-1.12.5/src/lib/strutils.c:34:12: branch_false: following 'false' branch (when 'len > 0')...
imlib2-1.12.5/src/lib/strutils.c:37:28: branch_false: ...to here
imlib2-1.12.5/src/lib/strutils.c:37:15: danger: '<unknown>' leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#   35|               continue;
#   36|   
#   37|->         lst = realloc(lst, (n + 2) * sizeof(char *));
#   38|   
#   39|           lst[n++] = strndup(s, len);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def201]
imlib2-1.12.5/src/lib/strutils.c:39:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'lst'
imlib2-1.12.5/src/lib/strutils.c:17:8: branch_false: following 'false' branch (when 'delim != 0')...
imlib2-1.12.5/src/lib/strutils.c:17:8: branch_false: ...to here
imlib2-1.12.5/src/lib/strutils.c:22:19: branch_true: following 'true' branch (when 's' is non-NULL)...
imlib2-1.12.5/src/lib/strutils.c:24:13: branch_true: ...to here
imlib2-1.12.5/src/lib/strutils.c:25:12: branch_false: following 'false' branch (when 'p' is NULL)...
imlib2-1.12.5/src/lib/strutils.c:32:19: branch_false: ...to here
imlib2-1.12.5/src/lib/strutils.c:34:12: branch_false: following 'false' branch (when 'len > 0')...
imlib2-1.12.5/src/lib/strutils.c:37:28: branch_false: ...to here
imlib2-1.12.5/src/lib/strutils.c:39:9: danger: dereference of NULL 'lst + (long unsigned int)n * 8'
#   37|           lst = realloc(lst, (n + 2) * sizeof(char *));
#   38|   
#   39|->         lst[n++] = strndup(s, len);
#   40|       }
#   41|   

Error: CPPCHECK_WARNING (CWE-476): [#def202]
imlib2-1.12.5/src/lib/updates.c:156: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: nu
#  154|           return u;
#  155|       nu = malloc(sizeof(ImlibUpdate));
#  156|->     nu->x = x;
#  157|       nu->y = y;
#  158|       nu->w = w;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def203]
imlib2-1.12.5/src/lib/updates.c:156:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'nu'
imlib2-1.12.5/src/lib/updates.c:155:10: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/updates.c:156:5: danger: 'nu' could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  154|           return u;
#  155|       nu = malloc(sizeof(ImlibUpdate));
#  156|->     nu->x = x;
#  157|       nu->y = y;
#  158|       nu->w = w;

Error: CPPCHECK_WARNING (CWE-476): [#def204]
imlib2-1.12.5/src/lib/updates.c:157: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: nu
#  155|       nu = malloc(sizeof(ImlibUpdate));
#  156|       nu->x = x;
#  157|->     nu->y = y;
#  158|       nu->w = w;
#  159|       nu->h = h;

Error: CPPCHECK_WARNING (CWE-476): [#def205]
imlib2-1.12.5/src/lib/updates.c:158: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: nu
#  156|       nu->x = x;
#  157|       nu->y = y;
#  158|->     nu->w = w;
#  159|       nu->h = h;
#  160|       nu->next = u;

Error: CPPCHECK_WARNING (CWE-476): [#def206]
imlib2-1.12.5/src/lib/updates.c:159: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: nu
#  157|       nu->y = y;
#  158|       nu->w = w;
#  159|->     nu->h = h;
#  160|       nu->next = u;
#  161|       return nu;

Error: CPPCHECK_WARNING (CWE-476): [#def207]
imlib2-1.12.5/src/lib/updates.c:160: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: nu
#  158|       nu->w = w;
#  159|       nu->h = h;
#  160|->     nu->next = u;
#  161|       return nu;
#  162|   }

Error: CPPCHECK_WARNING (CWE-476): [#def208]
imlib2-1.12.5/src/lib/updates.c:187: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: uu
#  185|   
#  186|       uu = malloc(sizeof(ImlibUpdate));
#  187|->     memcpy(uu, u, sizeof(ImlibUpdate));
#  188|       cu = u->next;
#  189|       pu = u;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def209]
imlib2-1.12.5/src/lib/updates.c:187:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'uu' where non-null expected
imlib2-1.12.5/src/lib/updates.c:183:8: branch_false: following 'false' branch (when 'u' is non-NULL)...
imlib2-1.12.5/src/lib/updates.c:186:10: branch_false: ...to here
imlib2-1.12.5/src/lib/updates.c:186:10: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/updates.c:187:5: danger: argument 1 ('uu') from [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2) could be NULL where non-null expected
#  185|   
#  186|       uu = malloc(sizeof(ImlibUpdate));
#  187|->     memcpy(uu, u, sizeof(ImlibUpdate));
#  188|       cu = u->next;
#  189|       pu = u;

Error: CPPCHECK_WARNING (CWE-476): [#def210]
imlib2-1.12.5/src/lib/updates.c:194: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: uu
#  192|       {
#  193|           uu = malloc(sizeof(ImlibUpdate));
#  194|->         memcpy(uu, u, sizeof(ImlibUpdate));
#  195|           pu->next = uu;
#  196|           pu = cu;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def211]
imlib2-1.12.5/src/lib/updates.c:194:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'uu' where non-null expected
imlib2-1.12.5/src/lib/updates.c:183:8: branch_false: following 'false' branch (when 'u' is non-NULL)...
imlib2-1.12.5/src/lib/updates.c:186:10: branch_false: ...to here
imlib2-1.12.5/src/lib/updates.c:191:12: branch_true: following 'true' branch (when 'cu' is non-NULL)...
imlib2-1.12.5/src/lib/updates.c:193:14: branch_true: ...to here
imlib2-1.12.5/src/lib/updates.c:193:14: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/updates.c:194:9: danger: argument 1 ('uu') from [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4) could be NULL where non-null expected
#  192|       {
#  193|           uu = malloc(sizeof(ImlibUpdate));
#  194|->         memcpy(uu, u, sizeof(ImlibUpdate));
#  195|           pu->next = uu;
#  196|           pu = cu;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def212]
imlib2-1.12.5/src/lib/x11_color.c:83:9: warning[-Wanalyzer-malloc-leak]: leak of 'color_lut'
imlib2-1.12.5/src/lib/x11_color.c:439:1: enter_function: entry to '__imlib_AllocColors1'
imlib2-1.12.5/src/lib/x11_color.c:445:17: acquire_memory: allocated here
imlib2-1.12.5/src/lib/x11_color.c:446:8: branch_false: following 'false' branch (when 'color_lut' is non-NULL)...
imlib2-1.12.5/src/lib/x11_color.c:450:5: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_color.c:460:8: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/x11_color.c:461:9: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:467:5: call_function: calling '_free_colors' from '__imlib_AllocColors1'
#   81|           for (i = 0; i < num; i++)
#   82|               pixels[i] = (unsigned long)lut[i];
#   83|->         XFreeColors(d, cmap, pixels, num, 0);
#   84|       }
#   85|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def213]
imlib2-1.12.5/src/lib/x11_color.c:121:23: warning[-Wanalyzer-malloc-leak]: leak of 'color_lut'
imlib2-1.12.5/src/lib/x11_color.c:100:17: acquire_memory: allocated here
imlib2-1.12.5/src/lib/x11_color.c:101:8: branch_false: following 'false' branch (when 'color_lut' is non-NULL)...
imlib2-1.12.5/src/lib/x11_color.c:101:8: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_color.c:103:17: branch_true: following 'true' branch (when 'r != 8')...
imlib2-1.12.5/src/lib/x11_color.c:103:17: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:105:21: branch_true: following 'true' branch (when 'g != 8')...
imlib2-1.12.5/src/lib/x11_color.c:105:21: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:107:25: branch_true: following 'true' branch (when 'b != 4')...
imlib2-1.12.5/src/lib/x11_color.c:107:25: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:121:23: throw: if 'XAllocColor' throws an exception...
imlib2-1.12.5/src/lib/x11_color.c:121:23: danger: 'color_lut' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  119|                   xcl.blue = (unsigned short)((val << 8) | (val));
#  120|                   xcl_in = xcl;
#  121|->                 ret = XAllocColor(x11->dpy, x11->cmap, &xcl);
#  122|                   if ((ret == 0) ||
#  123|                       ((xcl_in.red & sig_mask) != (xcl.red & sig_mask)) ||

Error: GCC_ANALYZER_WARNING (CWE-401): [#def214]
imlib2-1.12.5/src/lib/x11_color.c:170:23: warning[-Wanalyzer-malloc-leak]: leak of 'color_lut'
imlib2-1.12.5/src/lib/x11_color.c:149:17: acquire_memory: allocated here
imlib2-1.12.5/src/lib/x11_color.c:150:8: branch_false: following 'false' branch (when 'color_lut' is non-NULL)...
imlib2-1.12.5/src/lib/x11_color.c:150:8: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_color.c:152:17: branch_true: following 'true' branch (when 'r != 6')...
imlib2-1.12.5/src/lib/x11_color.c:152:17: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:154:21: branch_true: following 'true' branch (when 'g != 6')...
imlib2-1.12.5/src/lib/x11_color.c:154:21: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:156:25: branch_true: following 'true' branch (when 'b != 6')...
imlib2-1.12.5/src/lib/x11_color.c:163:30: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:170:23: throw: if 'XAllocColor' throws an exception...
imlib2-1.12.5/src/lib/x11_color.c:170:23: danger: 'color_lut' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  168|                   xcl.blue = (unsigned short)(val);
#  169|                   xcl_in = xcl;
#  170|->                 ret = XAllocColor(x11->dpy, x11->cmap, &xcl);
#  171|                   if ((ret == 0) ||
#  172|                       ((xcl_in.red & sig_mask) != (xcl.red & sig_mask)) ||

Error: GCC_ANALYZER_WARNING (CWE-401): [#def215]
imlib2-1.12.5/src/lib/x11_color.c:219:23: warning[-Wanalyzer-malloc-leak]: leak of 'color_lut'
imlib2-1.12.5/src/lib/x11_color.c:198:17: acquire_memory: allocated here
imlib2-1.12.5/src/lib/x11_color.c:199:8: branch_false: following 'false' branch (when 'color_lut' is non-NULL)...
imlib2-1.12.5/src/lib/x11_color.c:199:8: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_color.c:201:17: branch_true: following 'true' branch (when 'r != 4')...
imlib2-1.12.5/src/lib/x11_color.c:201:17: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:203:21: branch_true: following 'true' branch (when 'g != 8')...
imlib2-1.12.5/src/lib/x11_color.c:203:21: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:205:25: branch_true: following 'true' branch (when 'b != 4')...
imlib2-1.12.5/src/lib/x11_color.c:205:25: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:219:23: throw: if 'XAllocColor' throws an exception...
imlib2-1.12.5/src/lib/x11_color.c:219:23: danger: 'color_lut' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  217|                   xcl.blue = (unsigned short)((val << 8) | (val));
#  218|                   xcl_in = xcl;
#  219|->                 ret = XAllocColor(x11->dpy, x11->cmap, &xcl);
#  220|                   if ((ret == 0) ||
#  221|                       ((xcl_in.red & sig_mask) != (xcl.red & sig_mask)) ||

Error: GCC_ANALYZER_WARNING (CWE-401): [#def216]
imlib2-1.12.5/src/lib/x11_color.c:268:23: warning[-Wanalyzer-malloc-leak]: leak of 'color_lut'
imlib2-1.12.5/src/lib/x11_color.c:247:17: acquire_memory: allocated here
imlib2-1.12.5/src/lib/x11_color.c:248:8: branch_false: following 'false' branch (when 'color_lut' is non-NULL)...
imlib2-1.12.5/src/lib/x11_color.c:248:8: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_color.c:250:17: branch_true: following 'true' branch (when 'r != 4')...
imlib2-1.12.5/src/lib/x11_color.c:250:17: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:252:21: branch_true: following 'true' branch (when 'g != 4')...
imlib2-1.12.5/src/lib/x11_color.c:252:21: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:254:25: branch_true: following 'true' branch (when 'b != 4')...
imlib2-1.12.5/src/lib/x11_color.c:254:25: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:268:23: throw: if 'XAllocColor' throws an exception...
imlib2-1.12.5/src/lib/x11_color.c:268:23: danger: 'color_lut' leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  266|                   xcl.blue = (unsigned short)((val << 8) | (val));
#  267|                   xcl_in = xcl;
#  268|->                 ret = XAllocColor(x11->dpy, x11->cmap, &xcl);
#  269|                   if ((ret == 0) ||
#  270|                       ((xcl_in.red & sig_mask) != (xcl.red & sig_mask)) ||

Error: GCC_ANALYZER_WARNING (CWE-401): [#def217]
imlib2-1.12.5/src/lib/x11_color.c:318:23: warning[-Wanalyzer-malloc-leak]: leak of 'color_lut'
imlib2-1.12.5/src/lib/x11_color.c:296:17: acquire_memory: allocated here
imlib2-1.12.5/src/lib/x11_color.c:297:8: branch_false: following 'false' branch (when 'color_lut' is non-NULL)...
imlib2-1.12.5/src/lib/x11_color.c:297:8: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_color.c:299:17: branch_true: following 'true' branch (when 'r != 4')...
imlib2-1.12.5/src/lib/x11_color.c:299:17: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:301:21: branch_true: following 'true' branch (when 'g != 4')...
imlib2-1.12.5/src/lib/x11_color.c:301:21: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:303:25: branch_true: following 'true' branch (when 'b != 2')...
imlib2-1.12.5/src/lib/x11_color.c:303:25: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:318:23: throw: if 'XAllocColor' throws an exception...
imlib2-1.12.5/src/lib/x11_color.c:318:23: danger: 'color_lut' leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  316|                   xcl.blue = (unsigned short)((val << 8) | (val));
#  317|                   xcl_in = xcl;
#  318|->                 ret = XAllocColor(x11->dpy, x11->cmap, &xcl);
#  319|                   if ((ret == 0) ||
#  320|                       ((xcl_in.red & sig_mask) != (xcl.red & sig_mask)) ||

Error: GCC_ANALYZER_WARNING (CWE-401): [#def218]
imlib2-1.12.5/src/lib/x11_color.c:369:23: warning[-Wanalyzer-malloc-leak]: leak of 'color_lut'
imlib2-1.12.5/src/lib/x11_color.c:346:17: acquire_memory: allocated here
imlib2-1.12.5/src/lib/x11_color.c:347:8: branch_false: following 'false' branch (when 'color_lut' is non-NULL)...
imlib2-1.12.5/src/lib/x11_color.c:347:8: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_color.c:349:17: branch_true: following 'true' branch (when 'r != 2')...
imlib2-1.12.5/src/lib/x11_color.c:349:17: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:351:21: branch_true: following 'true' branch (when 'g != 4')...
imlib2-1.12.5/src/lib/x11_color.c:351:21: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:353:25: branch_true: following 'true' branch (when 'b != 2')...
imlib2-1.12.5/src/lib/x11_color.c:353:25: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:369:23: throw: if 'XAllocColor' throws an exception...
imlib2-1.12.5/src/lib/x11_color.c:369:23: danger: 'color_lut' leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  367|                   xcl.blue = (unsigned short)((val << 8) | (val));
#  368|                   xcl_in = xcl;
#  369|->                 ret = XAllocColor(x11->dpy, x11->cmap, &xcl);
#  370|                   if ((ret == 0) ||
#  371|                       ((xcl_in.red & sig_mask) != (xcl.red & sig_mask)) ||

Error: GCC_ANALYZER_WARNING (CWE-401): [#def219]
imlib2-1.12.5/src/lib/x11_color.c:421:23: warning[-Wanalyzer-malloc-leak]: leak of 'color_lut'
imlib2-1.12.5/src/lib/x11_color.c:397:17: acquire_memory: allocated here
imlib2-1.12.5/src/lib/x11_color.c:398:8: branch_false: following 'false' branch (when 'color_lut' is non-NULL)...
imlib2-1.12.5/src/lib/x11_color.c:398:8: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_color.c:400:17: branch_true: following 'true' branch (when 'r != 2')...
imlib2-1.12.5/src/lib/x11_color.c:400:17: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:402:21: branch_true: following 'true' branch (when 'g != 2')...
imlib2-1.12.5/src/lib/x11_color.c:402:21: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:404:25: branch_true: following 'true' branch (when 'b != 2')...
imlib2-1.12.5/src/lib/x11_color.c:404:25: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_color.c:421:23: throw: if 'XAllocColor' throws an exception...
imlib2-1.12.5/src/lib/x11_color.c:421:23: danger: 'color_lut' leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
#  419|                   xcl.blue = (unsigned short)((val << 8) | (val));
#  420|                   xcl_in = xcl;
#  421|->                 ret = XAllocColor(x11->dpy, x11->cmap, &xcl);
#  422|                   if ((ret == 0) ||
#  423|                       ((xcl_in.red & sig_mask) != (xcl.red & sig_mask)) ||

Error: GCC_ANALYZER_WARNING (CWE-401): [#def220]
imlib2-1.12.5/src/lib/x11_color.c:453:10: warning[-Wanalyzer-malloc-leak]: leak of 'color_lut'
imlib2-1.12.5/src/lib/x11_color.c:445:17: acquire_memory: allocated here
imlib2-1.12.5/src/lib/x11_color.c:446:8: branch_false: following 'false' branch (when 'color_lut' is non-NULL)...
imlib2-1.12.5/src/lib/x11_color.c:450:5: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_color.c:453:10: throw: if 'XAllocColor' throws an exception...
imlib2-1.12.5/src/lib/x11_color.c:453:10: danger: 'color_lut' leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  451|       xcl.green = (unsigned short)(0x0000);
#  452|       xcl.blue = (unsigned short)(0x0000);
#  453|->     if (!XAllocColor(x11->dpy, x11->cmap, &xcl))
#  454|           goto bail;
#  455|       color_lut[i++] = xcl.pixel;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def221]
imlib2-1.12.5/src/lib/x11_color.c:460:10: warning[-Wanalyzer-malloc-leak]: leak of 'color_lut'
imlib2-1.12.5/src/lib/x11_color.c:445:17: acquire_memory: allocated here
imlib2-1.12.5/src/lib/x11_color.c:446:8: branch_false: following 'false' branch (when 'color_lut' is non-NULL)...
imlib2-1.12.5/src/lib/x11_color.c:450:5: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_color.c:453:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_color.c:455:22: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_color.c:460:10: throw: if 'XAllocColor' throws an exception...
imlib2-1.12.5/src/lib/x11_color.c:460:10: danger: 'color_lut' leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  458|       xcl.green = (unsigned short)(0xffff);
#  459|       xcl.blue = (unsigned short)(0xffff);
#  460|->     if (!XAllocColor(x11->dpy, x11->cmap, &xcl))
#  461|           goto bail;
#  462|       color_lut[i] = xcl.pixel;

Error: CPPCHECK_WARNING (CWE-476): [#def222]
imlib2-1.12.5/src/lib/x11_context.c:103: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ct
#  101|       context_counter++;
#  102|       ct = malloc(sizeof(Context));
#  103|->     ct->last_use = context_counter;
#  104|       ct->x11 = *x11;
#  105|       ct->next = NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def223]
imlib2-1.12.5/src/lib/x11_context.c:103:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'ct'
imlib2-1.12.5/src/lib/x11_context.c:102:10: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/x11_context.c:103:5: danger: 'ct' could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  101|       context_counter++;
#  102|       ct = malloc(sizeof(Context));
#  103|->     ct->last_use = context_counter;
#  104|       ct->x11 = *x11;
#  105|       ct->next = NULL;

Error: CPPCHECK_WARNING (CWE-476): [#def224]
imlib2-1.12.5/src/lib/x11_context.c:104: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ct
#  102|       ct = malloc(sizeof(Context));
#  103|       ct->last_use = context_counter;
#  104|->     ct->x11 = *x11;
#  105|       ct->next = NULL;
#  106|   

Error: CPPCHECK_WARNING (CWE-476): [#def225]
imlib2-1.12.5/src/lib/x11_context.c:105: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ct
#  103|       ct->last_use = context_counter;
#  104|       ct->x11 = *x11;
#  105|->     ct->next = NULL;
#  106|   
#  107|       if (x11->depth <= 8)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def226]
imlib2-1.12.5/src/lib/x11_context.c:109:23: warning[-Wanalyzer-malloc-leak]: leak of 'ct'
imlib2-1.12.5/src/lib/x11_context.c:102:10: acquire_memory: allocated here
imlib2-1.12.5/src/lib/x11_context.c:107:8: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/x11_context.c:109:23: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_context.c:109:23: throw: if '__imlib_AllocColorTable' throws an exception...
imlib2-1.12.5/src/lib/x11_context.c:109:23: danger: 'ct' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  107|       if (x11->depth <= 8)
#  108|       {
#  109|->         ct->palette = __imlib_AllocColorTable(x11, &ct->palette_type);
#  110|           ct->r_dither = malloc(sizeof(uint8_t) * DM_X * DM_Y * 256);
#  111|           ct->g_dither = malloc(sizeof(uint8_t) * DM_X * DM_Y * 256);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def227]
imlib2-1.12.5/src/lib/x11_context.c:125:13: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
imlib2-1.12.5/src/lib/x11_context.c:107:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_context.c:118:9: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_context.c:120:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/x11_context.c:122:28: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_context.c:122:28: acquire_memory: allocated here
imlib2-1.12.5/src/lib/x11_context.c:125:13: throw: if '__imlib_RGBA_init' throws an exception...
imlib2-1.12.5/src/lib/x11_context.c:125:13: danger: '<unknown>' leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  123|               ct->g_dither = malloc(sizeof(uint16_t) * 4 * 4 * 256);
#  124|               ct->b_dither = malloc(sizeof(uint16_t) * 4 * 4 * 256);
#  125|->             __imlib_RGBA_init((void *)ct->r_dither, (void *)ct->g_dither,
#  126|                                 (void *)ct->b_dither, x11->depth, 0);
#  127|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def228]
imlib2-1.12.5/src/lib/x11_context.c:125:13: warning[-Wanalyzer-malloc-leak]: leak of 'ct'
imlib2-1.12.5/src/lib/x11_context.c:102:10: acquire_memory: allocated here
imlib2-1.12.5/src/lib/x11_context.c:107:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_context.c:118:9: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_context.c:120:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/x11_context.c:122:28: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_context.c:125:13: throw: if '__imlib_RGBA_init' throws an exception...
imlib2-1.12.5/src/lib/x11_context.c:125:13: danger: 'ct' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  123|               ct->g_dither = malloc(sizeof(uint16_t) * 4 * 4 * 256);
#  124|               ct->b_dither = malloc(sizeof(uint16_t) * 4 * 4 * 256);
#  125|->             __imlib_RGBA_init((void *)ct->r_dither, (void *)ct->g_dither,
#  126|                                 (void *)ct->b_dither, x11->depth, 0);
#  127|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def229]
imlib2-1.12.5/src/lib/x11_context.c:133:13: warning[-Wanalyzer-malloc-leak]: leak of 'ct'
imlib2-1.12.5/src/lib/x11_context.c:102:10: acquire_memory: allocated here
imlib2-1.12.5/src/lib/x11_context.c:107:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_context.c:118:9: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_context.c:120:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_context.c:130:13: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_context.c:133:13: throw: if '__imlib_RGBA_init' throws an exception...
imlib2-1.12.5/src/lib/x11_context.c:133:13: danger: 'ct' leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  131|               ct->g_dither = NULL;
#  132|               ct->b_dither = NULL;
#  133|->             __imlib_RGBA_init((void *)ct->r_dither, (void *)ct->g_dither,
#  134|                                 (void *)ct->b_dither, x11->depth, 0);
#  135|           }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def230]
imlib2-1.12.5/src/lib/x11_pixmap.c:111:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'ip'
imlib2-1.12.5/src/lib/x11_pixmap.c:329:1: enter_function: entry to '__imlib_CreatePixmapsForImage'
imlib2-1.12.5/src/lib/x11_pixmap.c:344:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_pixmap.c:358:8: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_pixmap.c:372:10: call_function: calling '__imlib_AddImagePixmapToCache' from '__imlib_CreatePixmapsForImage'
#  109|   
#  110|       ip = __imlib_ProduceImagePixmap();
#  111|->     ip->visual = x11->vis;
#  112|       ip->depth = x11->depth;
#  113|       ip->image = im;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def231]
imlib2-1.12.5/src/lib/x11_rend.c:321:13: warning[-Wanalyzer-malloc-leak]: leak of 'back'
imlib2-1.12.5/src/lib/x11_rend.c:273:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:276:9: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:276:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:279:10: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:279:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:298:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:301:9: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:301:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:304:10: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:304:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:307:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:316:10: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:318:8: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/x11_rend.c:320:16: acquire_memory: allocated here
imlib2-1.12.5/src/lib/x11_rend.c:321:13: throw: if '__imlib_GrabDrawableToRGBA' throws an exception...
imlib2-1.12.5/src/lib/x11_rend.c:321:13: danger: 'back' leaks here; was allocated at [(17)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/16)
#  319|       {
#  320|           back = malloc(dw * dh * sizeof(uint32_t));
#  321|->         if (__imlib_GrabDrawableToRGBA(x11, back, 0, 0, dw, dh,
#  322|                                          w, 0, dx, dy, dw, dh, 0, 1, false, NULL))
#  323|           {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def232]
imlib2-1.12.5/src/lib/x11_rend.c:367:14: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
imlib2-1.12.5/src/lib/x11_rend.c:273:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:276:9: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:276:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:279:10: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:279:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:298:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:301:9: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:301:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:304:10: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:304:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:307:8: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/x11_rend.c:309:21: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:310:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:316:10: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:330:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:336:8: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:336:8: branch_false: following 'false' branch (when 'm == 0')...
imlib2-1.12.5/src/lib/x11_rend.c:349:8: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:349:8: branch_true: following 'true' branch (when 'scaleinfo' is non-NULL)...
imlib2-1.12.5/src/lib/x11_rend.c:352:22: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:352:15: acquire_memory: allocated here
imlib2-1.12.5/src/lib/x11_rend.c:353:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
imlib2-1.12.5/src/lib/x11_rend.c:370:38: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:367:14: throw: if '__imlib_GetRGBAFunction' throws an exception...
imlib2-1.12.5/src/lib/x11_rend.c:367:14: danger: 'buf' leaks here; was allocated at [(23)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/22)
#  365|       /* scale in LINESIZE Y chunks and convert to depth */
#  366|       /* Get rgba and mask functions for XImage rendering */
#  367|->     rgbaer = __imlib_GetRGBAFunction(xim->bits_per_pixel,
#  368|                                        x11->vis->red_mask, x11->vis->green_mask,
#  369|                                        x11->vis->blue_mask, hiq,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def233]
imlib2-1.12.5/src/lib/x11_rend.c:383:13: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
imlib2-1.12.5/src/lib/x11_rend.c:273:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:276:9: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:276:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:279:10: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:279:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:298:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:301:9: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:301:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:304:10: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:304:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:307:8: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/x11_rend.c:309:21: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:310:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:316:10: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:330:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:336:8: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:336:8: branch_false: following 'false' branch (when 'm == 0')...
imlib2-1.12.5/src/lib/x11_rend.c:349:8: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:349:8: branch_true: following 'true' branch (when 'scaleinfo' is non-NULL)...
imlib2-1.12.5/src/lib/x11_rend.c:352:22: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:352:15: acquire_memory: allocated here
imlib2-1.12.5/src/lib/x11_rend.c:353:12: branch_false: following 'false' branch (when 'buf' is non-NULL)...
imlib2-1.12.5/src/lib/x11_rend.c:370:38: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:371:8: branch_false: following 'false' branch (when 'm == 0')...
imlib2-1.12.5/src/lib/x11_rend.c:373:5: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:373:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/x11_rend.c:376:12: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:380:12: branch_true: following 'true' branch (when 'scaleinfo' is non-NULL)...
imlib2-1.12.5/src/lib/x11_rend.c:383:13: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:383:13: throw: if '__imlib_Scale' throws an exception...
imlib2-1.12.5/src/lib/x11_rend.c:383:13: danger: 'buf' leaks here; was allocated at [(23)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/22)
#  381|           {
#  382|               /* scale the imagedata for this LINESIZE lines chunk of image data */
#  383|->             __imlib_Scale(scaleinfo, antialias, im->has_alpha,
#  384|                             im->data, buf, (sx * dw) / sw,
#  385|                             ((sy * dh) / sh) + y, 0, 0, dw, hh, dw, im->w);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def234]
imlib2-1.12.5/src/lib/x11_rend.c:408:17: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
imlib2-1.12.5/src/lib/x11_rend.c:273:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:276:9: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:276:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:279:10: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:279:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:298:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:301:9: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:301:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:304:10: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:304:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:307:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:316:10: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:330:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rend.c:336:8: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:336:8: branch_false: following 'false' branch (when 'm == 0')...
imlib2-1.12.5/src/lib/x11_rend.c:349:8: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:349:8: branch_false: following 'false' branch (when 'scaleinfo' is NULL)...
imlib2-1.12.5/src/lib/x11_rend.c:370:38: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:371:8: branch_false: following 'false' branch (when 'm == 0')...
imlib2-1.12.5/src/lib/x11_rend.c:373:5: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:373:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/x11_rend.c:376:12: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:380:12: branch_false: following 'false' branch (when 'scaleinfo' is NULL)...
imlib2-1.12.5/src/lib/x11_rend.c:393:16: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:393:16: branch_true: following 'true' branch (when 'cmod' is non-NULL)...
imlib2-1.12.5/src/lib/x11_rend.c:395:20: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:395:20: branch_true: following 'true' branch (when 'buf' is NULL)...
imlib2-1.12.5/src/lib/x11_rend.c:396:34: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:396:27: acquire_memory: allocated here
imlib2-1.12.5/src/lib/x11_rend.c:397:20: branch_false: following 'false' branch (when 'buf' is non-NULL)...
imlib2-1.12.5/src/lib/x11_rend.c:407:24: branch_false: ...to here
imlib2-1.12.5/src/lib/x11_rend.c:408:17: throw: if '__imlib_DataCmodApply' throws an exception...
imlib2-1.12.5/src/lib/x11_rend.c:408:17: danger: 'buf' leaks here; was allocated at [(31)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/30)
#  406|                   memcpy(buf, im->data + ((y + sy) * im->w),
#  407|                          im->w * hh * sizeof(uint32_t));
#  408|->                 __imlib_DataCmodApply(buf, im->w, hh, 0, true, cmod);
#  409|                   pointer = buf + sx;
#  410|                   jump = im->w - sw;

Error: CPPCHECK_WARNING (CWE-476): [#def235]
imlib2-1.12.5/src/lib/x11_rgba.c:2602: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: _dither_666r
# 2600|               for (y = 0; y < 256; y++)
# 2601|               {
# 2602|->                 _dither_666r[y] = (uint8_t) (((y * 6) >> 8) * 6 * 6);
# 2603|                   _dither_666g[y] = (uint8_t) (((y * 6) >> 8) * 6);
# 2604|                   _dither_666b[y] = (uint8_t) (((y * 6) >> 8));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def236]
imlib2-1.12.5/src/lib/x11_rgba.c:2602:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '_dither_666r'
imlib2-1.12.5/src/lib/x11_rgba.c:2480:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rgba.c:2594:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/x11_rgba.c:2596:32: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_rgba.c:2596:32: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/x11_rgba.c:2600:25: branch_true: following 'true' branch (when 'y != 256')...
imlib2-1.12.5/src/lib/x11_rgba.c:2602:47: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_rgba.c:2602:17: danger: '_dither_666r + (sizetype)y' could be NULL: unchecked value from [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
# 2600|               for (y = 0; y < 256; y++)
# 2601|               {
# 2602|->                 _dither_666r[y] = (uint8_t) (((y * 6) >> 8) * 6 * 6);
# 2603|                   _dither_666g[y] = (uint8_t) (((y * 6) >> 8) * 6);
# 2604|                   _dither_666b[y] = (uint8_t) (((y * 6) >> 8));

Error: CPPCHECK_WARNING (CWE-476): [#def237]
imlib2-1.12.5/src/lib/x11_rgba.c:2603: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: _dither_666g
# 2601|               {
# 2602|                   _dither_666r[y] = (uint8_t) (((y * 6) >> 8) * 6 * 6);
# 2603|->                 _dither_666g[y] = (uint8_t) (((y * 6) >> 8) * 6);
# 2604|                   _dither_666b[y] = (uint8_t) (((y * 6) >> 8));
# 2605|               }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def238]
imlib2-1.12.5/src/lib/x11_rgba.c:2603:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '_dither_666g'
imlib2-1.12.5/src/lib/x11_rgba.c:2480:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rgba.c:2594:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/x11_rgba.c:2596:32: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_rgba.c:2597:32: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/x11_rgba.c:2600:25: branch_true: following 'true' branch (when 'y != 256')...
imlib2-1.12.5/src/lib/x11_rgba.c:2602:47: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_rgba.c:2603:17: danger: '_dither_666g + (sizetype)y' could be NULL: unchecked value from [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
# 2601|               {
# 2602|                   _dither_666r[y] = (uint8_t) (((y * 6) >> 8) * 6 * 6);
# 2603|->                 _dither_666g[y] = (uint8_t) (((y * 6) >> 8) * 6);
# 2604|                   _dither_666b[y] = (uint8_t) (((y * 6) >> 8));
# 2605|               }

Error: CPPCHECK_WARNING (CWE-476): [#def239]
imlib2-1.12.5/src/lib/x11_rgba.c:2604: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: _dither_666b
# 2602|                   _dither_666r[y] = (uint8_t) (((y * 6) >> 8) * 6 * 6);
# 2603|                   _dither_666g[y] = (uint8_t) (((y * 6) >> 8) * 6);
# 2604|->                 _dither_666b[y] = (uint8_t) (((y * 6) >> 8));
# 2605|               }
# 2606|               for (y = 0; y < DM_Y; y++)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def240]
imlib2-1.12.5/src/lib/x11_rgba.c:2604:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '_dither_666b'
imlib2-1.12.5/src/lib/x11_rgba.c:2480:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/lib/x11_rgba.c:2594:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/lib/x11_rgba.c:2596:32: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_rgba.c:2598:32: acquire_memory: this call could return NULL
imlib2-1.12.5/src/lib/x11_rgba.c:2600:25: branch_true: following 'true' branch (when 'y != 256')...
imlib2-1.12.5/src/lib/x11_rgba.c:2602:47: branch_true: ...to here
imlib2-1.12.5/src/lib/x11_rgba.c:2604:17: danger: '_dither_666b + (sizetype)y' could be NULL: unchecked value from [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
# 2602|                   _dither_666r[y] = (uint8_t) (((y * 6) >> 8) * 6 * 6);
# 2603|                   _dither_666g[y] = (uint8_t) (((y * 6) >> 8) * 6);
# 2604|->                 _dither_666b[y] = (uint8_t) (((y * 6) >> 8));
# 2605|               }
# 2606|               for (y = 0; y < DM_Y; y++)

Error: CPPCHECK_WARNING (CWE-476): [#def241]
imlib2-1.12.5/src/lib/x11_rgba.c:2616: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: _dither_666b
# 2614|                           pi = 64.0 *
# 2615|                               (((double)i -
# 2616|->                               (_dither_666b[i] * (256.0 / 6.0))) /
# 2617|                                (256.0 / 6.0));
# 2618|                           if ((_dither_88[x][y] < (uint8_t) pi) &&

Error: CPPCHECK_WARNING (CWE-401): [#def242]
imlib2-1.12.5/src/lib/x11_ximage.c:344: error[memleakOnRealloc]: Common realloc mistake: 'xim_cache' nulled but not freed upon failure
#  342|               else
#  343|               {
#  344|->                 xim_cache =
#  345|                       realloc(xim_cache, sizeof(xim_cache_rec_t) * list_num);
#  346|               }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def243]
imlib2-1.12.5/src/modules/filters/filter_bumpmap.c:263:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '*info.filters'
imlib2-1.12.5/src/modules/filters/filter_bumpmap.c:261:21: acquire_memory: this call could return NULL
imlib2-1.12.5/src/modules/filters/filter_bumpmap.c:262:12: branch_true: following 'true' branch (when 'i != -1')...
imlib2-1.12.5/src/modules/filters/filter_bumpmap.c:263:35: branch_true: ...to here
imlib2-1.12.5/src/modules/filters/filter_bumpmap.c:262:12: branch_true: following 'true' branch (when 'i != -1')...
imlib2-1.12.5/src/modules/filters/filter_bumpmap.c:263:35: branch_true: ...to here
imlib2-1.12.5/src/modules/filters/filter_bumpmap.c:263:9: danger: 'malloc(16) + (long unsigned int)i * 8' could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  261|       info->filters = malloc(sizeof(char *) * i);
#  262|       while (--i >= 0)
#  263|->         info->filters[i] = strdup(filters[i]);
#  264|   }
#  265|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def244]
imlib2-1.12.5/src/modules/loaders/decompress_load.c:45:14: warning[-Wanalyzer-malloc-leak]: leak of 'real_ext'
imlib2-1.12.5/src/modules/loaders/decompress_load.c:20:42: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/decompress_load.c:22:13: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/decompress_load.c:28:8: branch_false: following 'false' branch (when 'q' is non-NULL)...
imlib2-1.12.5/src/modules/loaders/decompress_load.c:28:8: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/decompress_load.c:39:8: branch_false: following 'false' branch (when 'res != 0')...
imlib2-1.12.5/src/modules/loaders/decompress_load.c:42:33: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/decompress_load.c:42:22: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/decompress_load.c:42:8: branch_false: following 'false' branch (when 'real_ext' is non-NULL)...
imlib2-1.12.5/src/modules/loaders/decompress_load.c:45:14: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/decompress_load.c:45:14: throw: if '__imlib_FindBestLoader' throws an exception...
imlib2-1.12.5/src/modules/loaders/decompress_load.c:45:14: danger: 'real_ext' leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#   43|           return LOAD_OOM;
#   44|   
#   45|->     loader = __imlib_FindBestLoader(NULL, real_ext, 0);
#   46|       free(real_ext);
#   47|       if (!loader)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def245]
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:431:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'argbCmap[<unknown>]'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:158:1: enter_function: entry to '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:186:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:189:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:189:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:196:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:199:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:200:9: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:200:9: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:200:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:208:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:208:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:39: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:9: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:9: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:221:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:221:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:228:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:228:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:230:13: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:237:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:238:14: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:237:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:240:16: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:240:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:242:25: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:243:21: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:243:21: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:243:20: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:246:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:266:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:278:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:289:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:292:16: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:295:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:295:21: branch_false: following 'false' branch (when 'ncols <= i')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:393:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:396:8: branch_false: following 'false' branch (when 'load_data != 0')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:401:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:401:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:404:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:417:9: branch_true: following 'true' branch (when 'comp == 0')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:422:9: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:424:25: branch_true: following 'true' branch (when 'y < h')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:424:25: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:428:24: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:429:33: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:431:33: danger: use of uninitialized value 'argbCmap[<unknown>]' here
#  429|                           byte = *buffer_ptr++;
#  430|                       k = (byte >> 7) & 1;
#  431|->                     *imdata++ = argbCmap[k];
#  432|                       byte <<= 1;
#  433|                   }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def246]
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:472:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'argbCmap[<unknown>]'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:158:1: enter_function: entry to '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:186:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:189:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:189:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:196:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:199:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:200:9: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:200:9: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:200:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:208:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:208:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:39: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:9: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:9: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:221:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:221:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:228:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:228:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:230:13: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:237:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:238:14: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:237:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:240:16: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:240:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:242:25: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:243:21: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:243:21: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:243:20: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:246:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:266:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:278:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:289:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:292:16: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:295:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:295:21: branch_false: following 'false' branch (when 'ncols <= i')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:393:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:396:8: branch_false: following 'false' branch (when 'load_data != 0')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:401:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:401:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:404:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:456:20: branch_true: following 'true' branch (when 'buffer_ptr < buffer_end_safe')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:458:17: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:463:20: branch_true: following 'true' branch (when 'byte1 != 0')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:467:21: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:469:24: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:472:35: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:472:21: danger: use of uninitialized value 'argbCmap[<unknown>]' here
#  470|                           goto bail_bc4;
#  471|   
#  472|->                     t1 = argbCmap[byte2 >> 4];
#  473|                       t2 = argbCmap[byte2 & 0xF];
#  474|                       for (j = 0; j < l; j++)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def247]
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:524:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'argbCmap[<unknown>]'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:158:1: enter_function: entry to '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:186:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:189:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:189:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:196:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:199:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:200:9: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:200:9: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:200:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:208:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:208:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:39: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:9: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:9: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:221:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:221:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:228:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:228:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:230:13: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:237:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:238:14: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:237:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:240:16: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:240:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:242:25: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:243:21: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:243:21: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:243:20: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:246:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:266:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:278:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:289:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:292:16: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:295:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:295:21: branch_false: following 'false' branch (when 'ncols <= i')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:393:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:396:8: branch_false: following 'false' branch (when 'load_data != 0')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:401:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:401:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:404:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:456:20: branch_true: following 'true' branch (when 'buffer_ptr < buffer_end_safe')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:458:17: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:514:28: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:516:42: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:516:28: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:516:28: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:519:37: branch_true: following 'true' branch (when 'j < l')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:521:37: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:524:41: danger: use of uninitialized value 'argbCmap[<unknown>]' here
#  522|                               DD("%3d %3d:   %d/%d: %2d %2d\n",
#  523|                                  x, y, j, l, byte >> 4, byte & 0xf);
#  524|->                             *imdata++ = argbCmap[byte >> 4];
#  525|                               if (++j < l)
#  526|                                   *imdata++ = argbCmap[byte & 0xF];

Error: GCC_ANALYZER_WARNING (CWE-457): [#def248]
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:556:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'argbCmap[k]'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:158:1: enter_function: entry to '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:186:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:189:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:189:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:196:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:199:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:200:9: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:200:9: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:200:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:208:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:208:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:39: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:9: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:9: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:221:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:221:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:228:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:228:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:230:13: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:237:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:238:14: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:237:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:240:16: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:240:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:242:25: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:243:21: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:243:21: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:243:20: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:246:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:266:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:278:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:289:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:292:16: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:295:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:295:21: branch_false: following 'false' branch (when 'ncols <= i')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:393:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:396:8: branch_false: following 'false' branch (when 'load_data != 0')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:401:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:401:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:404:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:549:25: branch_true: following 'true' branch (when 'y < h')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:549:25: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:553:24: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:554:33: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:556:33: danger: use of uninitialized value 'argbCmap[k]' here
#  554|                           byte = *buffer_ptr++;
#  555|                       k = (byte & 0xF0) >> 4;
#  556|->                     *imdata++ = argbCmap[k];
#  557|                       byte <<= 4;
#  558|                   }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def249]
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:588:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'argbCmap[<unknown>]'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:158:1: enter_function: entry to '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:186:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:189:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:189:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:196:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:199:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:200:9: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:200:9: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:200:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:208:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:208:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:39: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:9: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:9: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:221:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:221:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:228:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:228:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:230:13: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:237:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:238:14: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:237:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:240:16: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:240:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:242:25: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:243:21: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:243:21: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:243:20: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:246:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:266:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:278:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:289:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:292:16: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:295:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:295:21: branch_false: following 'false' branch (when 'ncols <= i')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:393:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:396:8: branch_false: following 'false' branch (when 'load_data != 0')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:401:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:401:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:404:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:580:20: branch_true: following 'true' branch (when 'buffer_ptr < buffer_end_safe')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:582:17: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:586:20: branch_true: following 'true' branch (when 'byte1 != 0')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:588:29: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:588:21: danger: use of uninitialized value 'argbCmap[<unknown>]' here
#  586|                   if (byte1)
#  587|                   {
#  588|->                     pixel = argbCmap[byte2];
#  589|                       l = byte1;
#  590|                       if (x + l > w)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def250]
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:635:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'argbCmap[<unknown>]'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:158:1: enter_function: entry to '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:186:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:189:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:189:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:196:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:199:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:200:9: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:200:9: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:200:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:208:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:208:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:39: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:9: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:9: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:221:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:221:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:228:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:228:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:230:13: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:237:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:238:14: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:237:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:240:16: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:240:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:242:25: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:243:21: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:243:21: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:243:20: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:246:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:266:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:278:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:289:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:292:16: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:295:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:295:21: branch_false: following 'false' branch (when 'ncols <= i')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:393:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:396:8: branch_false: following 'false' branch (when 'load_data != 0')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:401:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:401:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:404:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:580:20: branch_true: following 'true' branch (when 'buffer_ptr < buffer_end_safe')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:582:17: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:586:20: branch_false: following 'false' branch (when 'byte1 == 0')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:598:21: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:635:41: danger: use of uninitialized value 'argbCmap[<unknown>]' here
#  633|                               byte = *buffer_ptr++;
#  634|                               DD("%3d %3d:   %d/%d: %2d\n", x, y, j, l, byte);
#  635|->                             *imdata++ = argbCmap[byte];
#  636|                           }
#  637|                           x += l;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def251]
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:662:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'argbCmap[<unknown>]'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:158:1: enter_function: entry to '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:186:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:189:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:189:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:196:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:199:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:200:9: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:200:9: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:200:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:208:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:208:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:39: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:9: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:9: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:211:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:221:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:221:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:228:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:228:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:230:13: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:237:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:238:14: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:237:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:240:16: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:240:16: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:242:25: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:243:21: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:243:21: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:243:20: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:246:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:266:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:278:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:289:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:292:16: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:295:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:295:21: branch_false: following 'false' branch (when 'ncols <= i')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:393:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:396:8: branch_false: following 'false' branch (when 'load_data != 0')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:401:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:401:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:404:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:657:25: branch_true: following 'true' branch (when 'y < h')...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:657:25: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:659:29: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:661:29: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_bmp.c:662:33: danger: use of uninitialized value 'argbCmap[<unknown>]' here
#  660|                   {
#  661|                       byte = *buffer_ptr++;
#  662|->                     *imdata++ = argbCmap[byte];
#  663|                   }
#  664|                   imdata -= w * 2;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def252]
imlib2-1.12.5/src/modules/loaders/loader_ff.c:130:23: warning[-Wanalyzer-malloc-leak]: leak of 'row'
imlib2-1.12.5/src/modules/loaders/loader_ff.c:100:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ff.c:103:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ff.c:104:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ff.c:108:14: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ff.c:109:11: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_ff.c:110:8: branch_false: following 'false' branch (when 'row' is non-NULL)...
imlib2-1.12.5/src/modules/loaders/loader_ff.c:113:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ff.c:114:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_ff.c:114:17: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ff.c:116:21: branch_false: following 'false' branch (when 'j >= rowlen')...
imlib2-1.12.5/src/modules/loaders/loader_ff.c:127:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ff.c:127:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ff.c:130:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ff.c:130:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_ff.c:130:23: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ff.c:130:23: throw: if '__imlib_LoadProgressRows' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_ff.c:130:23: danger: 'row' leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  128|               goto quit;
#  129|   
#  130|->         if (im->lc && __imlib_LoadProgressRows(im, i, 1))
#  131|               QUIT_WITH_RC(LOAD_BREAK);
#  132|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def253]
imlib2-1.12.5/src/modules/loaders/loader_gif.c:220:21: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
imlib2-1.12.5/src/modules/loaders/loader_gif.c:82:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:90:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:91:8: branch_true: following 'true' branch (when 'frame > 0')...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:97:14: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:98:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:100:27: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:120:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:127:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:127:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:133:12: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:133:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:135:17: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:135:16: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:146:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:170:16: branch_true: following 'true' branch (when 'pf' is non-NULL)...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:172:31: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:184:16: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:194:16: branch_false: following 'false' branch (when 'rows' is non-NULL)...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:194:16: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:197:25: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:199:27: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:199:27: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:200:20: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:197:36: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:197:25: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:204:17: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:204:16: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:204:16: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:218:29: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:220:21: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:220:21: throw: if 'DGifGetLine' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:220:21: danger: '<unknown>' leaks here; was allocated at [(23)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/22)
#  218|                   for (i = 0; i < im->h; i++)
#  219|                   {
#  220|->                     DGifGetLine(gif, rows[i], im->w);
#  221|                   }
#  222|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def254]
imlib2-1.12.5/src/modules/loaders/loader_gif.c:220:21: warning[-Wanalyzer-malloc-leak]: leak of 'rows'
imlib2-1.12.5/src/modules/loaders/loader_gif.c:82:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:90:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:91:8: branch_true: following 'true' branch (when 'frame > 0')...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:97:14: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:98:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:100:27: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:120:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:127:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:127:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:133:12: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:133:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:135:17: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:135:16: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:146:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:170:16: branch_true: following 'true' branch (when 'pf' is non-NULL)...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:172:31: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:184:16: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:193:20: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:194:16: branch_false: following 'false' branch (when 'rows' is non-NULL)...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:194:16: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:197:25: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:199:27: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:200:20: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:197:36: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:197:25: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:204:17: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:204:16: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:204:16: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:218:29: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:220:21: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_gif.c:220:21: throw: if 'DGifGetLine' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_gif.c:220:21: danger: 'rows' leaks here; was allocated at [(19)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/18)
#  218|                   for (i = 0; i < im->h; i++)
#  219|                   {
#  220|->                     DGifGetLine(gif, rows[i], im->w);
#  221|                   }
#  222|               }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def255]
imlib2-1.12.5/src/modules/loaders/loader_ico.c:313:14: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:264:1: enter_function: entry to '_load'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:282:9: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:282:9: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:282:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:289:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:289:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:290:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:289:9: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:290:55: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:289:9: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:293:14: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:294:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:294:8: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:299:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:301:9: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:301:9: call_function: calling 'ico_read_idir' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:301:9: return_function: returning to '_load' from 'ico_read_idir'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:302:9: call_function: calling 'ico_read_icon' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:302:9: return_function: returning to '_load' from 'ico_read_icon'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:299:17: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:307:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:308:8: branch_true: following 'true' branch (when 'frame > 0')...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:310:12: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:313:14: throw: if '__imlib_GetFrame' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:313:14: danger: '<unknown>' leaks here; was allocated at [(46)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/45)
#  311|               QUIT_WITH_RC(LOAD_BADFRAME);
#  312|   
#  313|->         pf = __imlib_GetFrame(im);
#  314|           if (!pf)
#  315|               QUIT_WITH_RC(LOAD_OOM);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def256]
imlib2-1.12.5/src/modules/loaders/loader_ico.c:313:14: warning[-Wanalyzer-malloc-leak]: leak of 'ico.ie'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:264:1: enter_function: entry to '_load'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:282:9: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:282:9: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:282:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:289:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:289:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:290:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:289:9: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:290:55: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:289:9: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:293:14: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:293:14: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:294:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:294:8: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:299:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:301:9: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:301:9: call_function: calling 'ico_read_idir' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:301:9: return_function: returning to '_load' from 'ico_read_idir'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:302:9: call_function: calling 'ico_read_icon' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:302:9: return_function: returning to '_load' from 'ico_read_icon'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:299:17: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:307:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:308:8: branch_true: following 'true' branch (when 'frame > 0')...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:310:12: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:313:14: throw: if '__imlib_GetFrame' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:313:14: danger: 'ico.ie' leaks here; was allocated at [(15)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/14)
#  311|               QUIT_WITH_RC(LOAD_BADFRAME);
#  312|   
#  313|->         pf = __imlib_GetFrame(im);
#  314|           if (!pf)
#  315|               QUIT_WITH_RC(LOAD_OOM);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def257]
imlib2-1.12.5/src/modules/loaders/loader_ico.c:355:10: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:264:1: enter_function: entry to '_load'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:282:9: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:282:9: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:282:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:289:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:289:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:290:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:289:9: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:290:55: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:289:9: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:293:14: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:294:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:294:8: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:299:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:301:9: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:301:9: call_function: calling 'ico_read_idir' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:301:9: return_function: returning to '_load' from 'ico_read_idir'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:302:9: call_function: calling 'ico_read_icon' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:302:9: return_function: returning to '_load' from 'ico_read_icon'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:299:17: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:307:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:308:8: branch_false: following 'false' branch (when 'frame <= 0')...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:320:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:344:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:352:8: branch_false: following 'false' branch (when 'load_data != 0')...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:355:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:355:10: throw: if '__imlib_AllocateData' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:355:10: danger: '<unknown>' leaks here; was allocated at [(46)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/45)
#  353|           QUIT_WITH_RC(LOAD_SUCCESS);
#  354|   
#  355|->     if (!__imlib_AllocateData(im))
#  356|           QUIT_WITH_RC(LOAD_OOM);
#  357|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def258]
imlib2-1.12.5/src/modules/loaders/loader_ico.c:355:10: warning[-Wanalyzer-malloc-leak]: leak of 'ico.ie'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:264:1: enter_function: entry to '_load'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:282:9: call_function: calling 'mm_read' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:282:9: return_function: returning to '_load' from 'mm_read'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:282:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:289:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:289:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:290:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:289:9: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:290:55: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:289:9: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:293:14: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:293:14: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:294:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:294:8: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:299:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:301:9: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:301:9: call_function: calling 'ico_read_idir' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:301:9: return_function: returning to '_load' from 'ico_read_idir'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:302:9: call_function: calling 'ico_read_icon' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:302:9: return_function: returning to '_load' from 'ico_read_icon'
imlib2-1.12.5/src/modules/loaders/loader_ico.c:299:17: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:307:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:308:8: branch_false: following 'false' branch (when 'frame <= 0')...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:320:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:344:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:352:8: branch_false: following 'false' branch (when 'load_data != 0')...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:355:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_ico.c:355:10: throw: if '__imlib_AllocateData' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_ico.c:355:10: danger: 'ico.ie' leaks here; was allocated at [(15)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/14)
#  353|           QUIT_WITH_RC(LOAD_SUCCESS);
#  354|   
#  355|->     if (!__imlib_AllocateData(im))
#  356|           QUIT_WITH_RC(LOAD_OOM);
#  357|   

Error: CPPCHECK_WARNING (CWE-476): [#def259]
imlib2-1.12.5/src/modules/loaders/loader_id3.c:49: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: node
#   47|       int             last_id = INT_MAX;
#   48|   
#   49|->     node->refcount = 1;
#   50|       {
#   51|           int             fd;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def260]
imlib2-1.12.5/src/modules/loaders/loader_id3.c:49:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'node'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:242:1: enter_function: entry to 'get_options'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:289:8: branch_false: following 'false' branch (when 'handle == 0')...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:42: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: call_function: calling 'context_create' from 'get_options'
#   47|       int             last_id = INT_MAX;
#   48|   
#   49|->     node->refcount = 1;
#   50|       {
#   51|           int             fd;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def261]
imlib2-1.12.5/src/modules/loaders/loader_id3.c:57:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:242:1: enter_function: entry to 'get_options'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:289:8: branch_false: following 'false' branch (when 'handle == 0')...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:42: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: call_function: calling 'context_create' from 'get_options'
#   55|   
#   56|           fd = dup(fileno(f));
#   57|->         file = id3_file_fdopen(fd, ID3_FILE_MODE_READONLY);
#   58|           if (!file)
#   59|           {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def262]
imlib2-1.12.5/src/modules/loaders/loader_id3.c:57:16: warning[-Wanalyzer-malloc-leak]: leak of 'node'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:242:1: enter_function: entry to 'get_options'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:289:8: branch_false: following 'false' branch (when 'handle == 0')...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:42: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: call_function: calling 'context_create' from 'get_options'
#   55|   
#   56|           fd = dup(fileno(f));
#   57|->         file = id3_file_fdopen(fd, ID3_FILE_MODE_READONLY);
#   58|           if (!file)
#   59|           {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def263]
imlib2-1.12.5/src/modules/loaders/loader_id3.c:60:13: warning[-Wanalyzer-malloc-leak]: leak of 'node'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:242:1: enter_function: entry to 'get_options'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:289:8: branch_false: following 'false' branch (when 'handle == 0')...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:42: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: call_function: calling 'context_create' from 'get_options'
#   58|           if (!file)
#   59|           {
#   60|->             close(fd);
#   61|               E("Unable to open tagged file %s: %m\n", filename);
#   62|               goto fail_free;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def264]
imlib2-1.12.5/src/modules/loaders/loader_id3.c:61:13: warning[-Wanalyzer-malloc-leak]: leak of 'node'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:242:1: enter_function: entry to 'get_options'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:289:8: branch_false: following 'false' branch (when 'handle == 0')...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:42: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: call_function: calling 'context_create' from 'get_options'
#   59|           {
#   60|               close(fd);
#   61|->             E("Unable to open tagged file %s: %m\n", filename);
#   62|               goto fail_free;
#   63|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def265]
imlib2-1.12.5/src/modules/loaders/loader_id3.c:64:15: warning[-Wanalyzer-malloc-leak]: leak of 'node'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:242:1: enter_function: entry to 'get_options'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:289:8: branch_false: following 'false' branch (when 'handle == 0')...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:42: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: call_function: calling 'context_create' from 'get_options'
#   62|               goto fail_free;
#   63|           }
#   64|->         tag = id3_file_tag(file);
#   65|           if (!tag)
#   66|           {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def266]
imlib2-1.12.5/src/modules/loaders/loader_id3.c:67:13: warning[-Wanalyzer-malloc-leak]: leak of 'node'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:242:1: enter_function: entry to 'get_options'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:289:8: branch_false: following 'false' branch (when 'handle == 0')...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:42: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: call_function: calling 'context_create' from 'get_options'
#   65|           if (!tag)
#   66|           {
#   67|->             E("Unable to find ID3v2 tags in file %s\n", filename);
#   68|               id3_file_close(file);
#   69|               goto fail_free;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def267]
imlib2-1.12.5/src/modules/loaders/loader_id3.c:68:13: warning[-Wanalyzer-malloc-leak]: leak of 'node'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:242:1: enter_function: entry to 'get_options'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:289:8: branch_false: following 'false' branch (when 'handle == 0')...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:42: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: call_function: calling 'context_create' from 'get_options'
#   66|           {
#   67|               E("Unable to find ID3v2 tags in file %s\n", filename);
#   68|->             id3_file_close(file);
#   69|               goto fail_free;
#   70|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def268]
imlib2-1.12.5/src/modules/loaders/loader_id3.c:71:21: warning[-Wanalyzer-malloc-leak]: leak of 'node'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:242:1: enter_function: entry to 'get_options'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:289:8: branch_false: following 'false' branch (when 'handle == 0')...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:42: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: call_function: calling 'context_create' from 'get_options'
#   69|               goto fail_free;
#   70|           }
#   71|->         node->tag = id3_tag_new();
#   72|           for (i = 0; i < id3_tag_get_numframes(tag); i++)
#   73|               if (!strcmp(id3_frame_id(id3_tag_get_frame(tag, i)), "APIC"))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def269]
imlib2-1.12.5/src/modules/loaders/loader_id3.c:74:17: warning[-Wanalyzer-malloc-leak]: leak of 'node'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:242:1: enter_function: entry to 'get_options'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:289:8: branch_false: following 'false' branch (when 'handle == 0')...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:42: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: call_function: calling 'context_create' from 'get_options'
#   72|           for (i = 0; i < id3_tag_get_numframes(tag); i++)
#   73|               if (!strcmp(id3_frame_id(id3_tag_get_frame(tag, i)), "APIC"))
#   74|->                 id3_tag_attachframe(node->tag, id3_tag_get_frame(tag, i));
#   75|           id3_file_close(file);
#   76|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def270]
imlib2-1.12.5/src/modules/loaders/loader_id3.c:75:9: warning[-Wanalyzer-malloc-leak]: leak of 'node'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:242:1: enter_function: entry to 'get_options'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:289:8: branch_false: following 'false' branch (when 'handle == 0')...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:42: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:291:13: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:292:22: call_function: calling 'context_create' from 'get_options'
#   73|               if (!strcmp(id3_frame_id(id3_tag_get_frame(tag, i)), "APIC"))
#   74|                   id3_tag_attachframe(node->tag, id3_tag_get_frame(tag, i));
#   75|->         id3_file_close(file);
#   76|       }
#   77|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def271]
imlib2-1.12.5/src/modules/loaders/loader_id3.c:100:9: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:495:1: enter_function: entry to '_load'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:504:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:507:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:507:10: call_function: calling 'get_options' from '_load'
#   98|       if (!ptr)
#   99|       {
#  100|->         E("Too many open ID3 contexts\n");
#  101|           goto fail_close;
#  102|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def272]
imlib2-1.12.5/src/modules/loaders/loader_id3.c:100:9: warning[-Wanalyzer-malloc-leak]: leak of 'node'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:495:1: enter_function: entry to '_load'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:504:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:507:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:507:10: call_function: calling 'get_options' from '_load'
#   98|       if (!ptr)
#   99|       {
#  100|->         E("Too many open ID3 contexts\n");
#  101|           goto fail_close;
#  102|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def273]
imlib2-1.12.5/src/modules/loaders/loader_id3.c:120:5: warning[-Wanalyzer-malloc-leak]: leak of 'node'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:495:1: enter_function: entry to '_load'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:504:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:507:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:507:10: call_function: calling 'get_options' from '_load'
#  118|     fail_close:
#  119|       free(node->filename);
#  120|->     id3_tag_delete(node->tag);
#  121|     fail_free:
#  122|       free(node);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def274]
imlib2-1.12.5/src/modules/loaders/loader_id3.c:302:17: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctx'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:495:1: enter_function: entry to '_load'
imlib2-1.12.5/src/modules/loaders/loader_id3.c:502:5: release_memory: 'opt.ctx' is NULL
imlib2-1.12.5/src/modules/loaders/loader_id3.c:504:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_id3.c:507:10: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_id3.c:507:10: call_function: calling 'get_options' from '_load'
#  300|               index = htag->val;
#  301|       }
#  302|->     if (index > id3_tag_get_numframes(ctx->tag) ||
#  303|           (index == 0 && id3_tag_get_numframes(ctx->tag) < 1))
#  304|       {

Error: CPPCHECK_WARNING (CWE-476): [#def275]
imlib2-1.12.5/src/modules/loaders/loader_id3.c:559: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: url
#  557|           }
#  558|           url = (char *)malloc((length + 1) * sizeof(char));
#  559|->         strncpy(url, data, length);
#  560|           url[length] = '\0';
#  561|           file = (strncmp(url, "file://", 7) ? url : url + 7);

Error: CPPCHECK_WARNING (CWE-476): [#def276]
imlib2-1.12.5/src/modules/loaders/loader_id3.c:560: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: url
#  558|           url = (char *)malloc((length + 1) * sizeof(char));
#  559|           strncpy(url, data, length);
#  560|->         url[length] = '\0';
#  561|           file = (strncmp(url, "file://", 7) ? url : url + 7);
#  562|           if (!(loader = __imlib_FindBestLoader(file, NULL, 0)))

Error: CPPCHECK_WARNING (CWE-682): [#def277]
imlib2-1.12.5/src/modules/loaders/loader_id3.c:561: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  559|           strncpy(url, data, length);
#  560|           url[length] = '\0';
#  561|->         file = (strncmp(url, "file://", 7) ? url : url + 7);
#  562|           if (!(loader = __imlib_FindBestLoader(file, NULL, 0)))
#  563|           {

Error: CPPCHECK_WARNING (CWE-476): [#def278]
imlib2-1.12.5/src/modules/loaders/loader_id3.c:561: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: url
#  559|           strncpy(url, data, length);
#  560|           url[length] = '\0';
#  561|->         file = (strncmp(url, "file://", 7) ? url : url + 7);
#  562|           if (!(loader = __imlib_FindBestLoader(file, NULL, 0)))
#  563|           {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def279]
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:57:11: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:256:1: enter_function: entry to '_save'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:270:11: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:271:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:277:15: call_function: inlined call to '_jdata_init' from '_save'
#   55|       struct jpeg_error_mgr *jem;
#   56|   
#   57|->     jem = jpeg_std_error(&jd->jem);
#   58|   
#   59|       jd->jem.error_exit = _JPEGFatalErrorHandler;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def280]
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:139:14: warning[-Wanalyzer-malloc-leak]: leak of 'jdata.data'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:83:9: setjmp: 'sigsetjmp' called here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:83:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:86:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:108:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:122:8: branch_false: following 'false' branch (when 'load_data != 0')...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:127:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:131:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:134:18: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:135:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:139:14: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:139:14: throw: if '__imlib_AllocateData' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:139:14: danger: 'jdata.data' leaks here; was allocated at [(10)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/9)
#  137|   
#  138|       /* must set the im->data member before callign progress function */
#  139|->     imdata = __imlib_AllocateData(im);
#  140|       if (!imdata)
#  141|           QUIT_WITH_RC(LOAD_OOM);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def281]
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:283:5: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:256:1: enter_function: entry to '_save'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:270:11: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:271:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:277:15: call_function: inlined call to '_jdata_init' from '_save'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:278:9: setjmp: 'sigsetjmp' called here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:278:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:282:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:283:5: throw: if 'jpeg_stdio_dest' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:283:5: danger: 'buf' leaks here; was allocated at [(2)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/1)
#  281|       /* setup compress params */
#  282|       jpeg_create_compress(&jcs);
#  283|->     jpeg_stdio_dest(&jcs, f);
#  284|       jcs.image_width = im->w;
#  285|       jcs.image_height = im->h;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def282]
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:293:5: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:256:1: enter_function: entry to '_save'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:270:11: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:271:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:277:15: call_function: inlined call to '_jdata_init' from '_save'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:278:9: setjmp: 'sigsetjmp' called here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:278:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:282:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:293:5: throw: if 'get_saver_params' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:293:5: danger: 'buf' leaks here; was allocated at [(2)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/1)
#  291|       /* saver modules */
#  292|   
#  293|->     get_saver_params(im, &imsp);
#  294|   
#  295|       /* set up jepg compression parameters */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def283]
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:296:5: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:256:1: enter_function: entry to '_save'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:270:11: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:271:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:277:15: call_function: inlined call to '_jdata_init' from '_save'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:278:9: setjmp: 'sigsetjmp' called here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:278:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:282:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:296:5: throw: if 'jpeg_set_defaults' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:296:5: danger: 'buf' leaks here; was allocated at [(2)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/1)
#  294|   
#  295|       /* set up jepg compression parameters */
#  296|->     jpeg_set_defaults(&jcs);
#  297|       jpeg_set_quality(&jcs, imsp.quality, TRUE);
#  298|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def284]
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:297:5: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:256:1: enter_function: entry to '_save'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:270:11: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:271:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:277:15: call_function: inlined call to '_jdata_init' from '_save'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:278:9: setjmp: 'sigsetjmp' called here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:278:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:282:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:297:5: throw: if 'jpeg_set_quality' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:297:5: danger: 'buf' leaks here; was allocated at [(2)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/1)
#  295|       /* set up jepg compression parameters */
#  296|       jpeg_set_defaults(&jcs);
#  297|->     jpeg_set_quality(&jcs, imsp.quality, TRUE);
#  298|   
#  299|       /* progressive */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def285]
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:301:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:256:1: enter_function: entry to '_save'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:270:11: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:271:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:277:15: call_function: inlined call to '_jdata_init' from '_save'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:278:9: setjmp: 'sigsetjmp' called here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:278:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:282:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:300:8: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:301:9: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:301:9: throw: if 'jpeg_simple_progression' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:301:9: danger: 'buf' leaks here; was allocated at [(2)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/1)
#  299|       /* progressive */
#  300|       if (imsp.interlacing)
#  301|->         jpeg_simple_progression(&jcs);
#  302|   
#  303|       jpeg_start_compress(&jcs, TRUE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def286]
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:303:5: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:256:1: enter_function: entry to '_save'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:270:11: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:271:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:277:15: call_function: inlined call to '_jdata_init' from '_save'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:278:9: setjmp: 'sigsetjmp' called here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:278:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:282:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:303:5: throw: if 'jpeg_start_compress' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:303:5: danger: 'buf' leaks here; was allocated at [(2)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/1)
#  301|           jpeg_simple_progression(&jcs);
#  302|   
#  303|->     jpeg_start_compress(&jcs, TRUE);
#  304|       /* get the start pointer */
#  305|       imdata = im->data;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def287]
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:320:9: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:256:1: enter_function: entry to '_save'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:270:11: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:271:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:277:15: call_function: inlined call to '_jdata_init' from '_save'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:278:9: setjmp: 'sigsetjmp' called here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:278:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:282:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:307:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:307:17: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:310:28: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:320:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:320:9: throw: if 'jpeg_write_scanlines' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:320:9: danger: 'buf' leaks here; was allocated at [(2)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/1)
#  318|           /* write scanline */
#  319|           jbuf = (JSAMPROW *) (&buf);
#  320|->         jpeg_write_scanlines(&jcs, jbuf, 1);
#  321|   
#  322|           if (im->lc && __imlib_LoadProgressRows(im, y, 1))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def288]
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:326:5: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:256:1: enter_function: entry to '_save'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:270:11: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:271:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:277:15: call_function: inlined call to '_jdata_init' from '_save'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:278:9: setjmp: 'sigsetjmp' called here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:278:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:282:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:307:17: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:326:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:326:5: throw: if 'jpeg_finish_compress' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:326:5: danger: 'buf' leaks here; was allocated at [(2)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/1)
#  324|       }
#  325|   
#  326|->     jpeg_finish_compress(&jcs);
#  327|   
#  328|       rc = LOAD_SUCCESS;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def289]
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:332:5: warning[-Wanalyzer-malloc-leak]: leak of 'buf'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:256:1: enter_function: entry to '_save'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:270:11: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:271:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:277:15: call_function: inlined call to '_jdata_init' from '_save'
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:278:9: setjmp: 'sigsetjmp' called here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:278:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:282:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:307:17: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:326:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:332:5: throw: if 'jpeg_destroy_compress' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_jpeg.c:332:5: danger: 'buf' leaks here; was allocated at [(2)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/1)
#  330|     quit:
#  331|       /* finish off */
#  332|->     jpeg_destroy_compress(&jcs);
#  333|       free(buf);
#  334|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def290]
imlib2-1.12.5/src/modules/loaders/loader_jxl.c:336:11: warning[-Wanalyzer-malloc-leak]: leak of 'buf_ptr'
imlib2-1.12.5/src/modules/loaders/loader_jxl.c:248:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jxl.c:252:17: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jxl.c:257:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jxl.c:260:11: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jxl.c:261:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jxl.c:265:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jxl.c:275:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jxl.c:278:12: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jxl.c:279:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_jxl.c:282:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jxl.c:309:14: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_jxl.c:310:8: branch_false: following 'false' branch (when 'buffer' is non-NULL)...
imlib2-1.12.5/src/modules/loaders/loader_jxl.c:314:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jxl.c:316:8: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_jxl.c:316:8: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jxl.c:318:21: branch_false: following 'false' branch (when 'i >= npix')...
imlib2-1.12.5/src/modules/loaders/loader_jxl.c:336:11: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_jxl.c:336:11: throw: if 'JxlEncoderAddImageFrame' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_jxl.c:336:11: danger: 'buf_ptr' leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#  334|       }
#  335|   
#  336|->     jst = JxlEncoderAddImageFrame(opts, &pbuf_fmt, buffer, buf_len);
#  337|       if (jst != JXL_ENC_SUCCESS)
#  338|           goto quit;

Error: COMPILER_WARNING (CWE-758): [#def291]
imlib2-1.12.5/src/modules/loaders/loader_png.c: scope_hint: In function '_load'
imlib2-1.12.5/src/modules/loaders/loader_png.c:283:21: warning[-Wclobbered]: variable 'rc' might be clobbered by 'longjmp' or 'vfork'
#  283 |     int             rc;
#      |                     ^~
#  281|   _load(ImlibImage *im, int load_data)
#  282|   {
#  283|->     int             rc;
#  284|       png_structp     png_ptr = NULL;
#  285|       png_infop       info_ptr = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def292]
imlib2-1.12.5/src/modules/loaders/loader_png.c:625:15: warning[-Wanalyzer-malloc-leak]: leak of 'row_ptr'
imlib2-1.12.5/src/modules/loaders/loader_png.c:614:8: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_png.c:616:26: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_png.c:616:19: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_png.c:617:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_png.c:620:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_png.c:625:15: throw: if 'png_create_write_struct' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_png.c:625:15: danger: 'row_ptr' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  623|       info_ptr = NULL;
#  624|   
#  625|->     png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL,
#  626|                                         user_error_fn, user_warning_fn);
#  627|       if (!png_ptr)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def293]
imlib2-1.12.5/src/modules/loaders/loader_png.c:630:16: warning[-Wanalyzer-malloc-leak]: leak of 'row_ptr'
imlib2-1.12.5/src/modules/loaders/loader_png.c:614:8: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_png.c:616:26: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_png.c:616:19: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_png.c:617:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_png.c:620:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_png.c:627:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_png.c:630:16: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_png.c:630:16: throw: if 'png_create_info_struct' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_png.c:630:16: danger: 'row_ptr' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  628|           QUIT_WITH_RC(LOAD_OOM);
#  629|   
#  630|->     info_ptr = png_create_info_struct(png_ptr);
#  631|       if (!info_ptr)
#  632|           QUIT_WITH_RC(LOAD_OOM);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def294]
imlib2-1.12.5/src/modules/loaders/loader_png.c:634:9: warning[-Wanalyzer-malloc-leak]: leak of 'row_ptr'
imlib2-1.12.5/src/modules/loaders/loader_png.c:614:8: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_png.c:616:26: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_png.c:616:19: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_png.c:617:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_png.c:620:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_png.c:627:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_png.c:630:16: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_png.c:631:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_png.c:634:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_png.c:634:9: throw: if 'png_set_longjmp_fn' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_png.c:634:9: danger: 'row_ptr' leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  632|           QUIT_WITH_RC(LOAD_OOM);
#  633|   
#  634|->     if (setjmp(png_jmpbuf(png_ptr)))
#  635|           QUIT_WITH_RC(LOAD_BADFILE);
#  636|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def295]
imlib2-1.12.5/src/modules/loaders/loader_png.c:717:21: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
imlib2-1.12.5/src/modules/loaders/loader_png.c:614:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_png.c:620:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_png.c:627:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_png.c:630:16: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_png.c:631:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_png.c:634:9: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_png.c:634:9: setjmp: 'setjmp' called here
imlib2-1.12.5/src/modules/loaders/loader_png.c:634:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_png.c:637:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_png.c:698:20: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_png.c:700:9: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_png.c:707:16: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_png.c:707:16: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_png.c:713:36: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_png.c:715:51: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_png.c:717:21: danger: dereference of NULL 'row_buf + (sizetype)j'
#  715|                       uint32_t        pixel = imdata[x];
#  716|   
#  717|->                     row_buf[j++] = PIXEL_R(pixel);
#  718|                       row_buf[j++] = PIXEL_G(pixel);
#  719|                       row_buf[j++] = PIXEL_B(pixel);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def296]
imlib2-1.12.5/src/modules/loaders/loader_png.c:736:9: warning[-Wanalyzer-malloc-leak]: leak of 'row_ptr'
imlib2-1.12.5/src/modules/loaders/loader_png.c:614:8: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_png.c:616:26: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_png.c:616:19: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_png.c:617:12: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_png.c:620:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_png.c:627:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_png.c:630:16: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_png.c:631:8: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_png.c:632:9: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_png.c:735:8: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_png.c:736:9: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_png.c:736:9: throw: if 'png_destroy_write_struct' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_png.c:736:9: danger: 'row_ptr' leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  734|     quit:
#  735|       if (png_ptr)
#  736|->         png_destroy_write_struct(&png_ptr, &info_ptr);
#  737|       free(row_buf);
#  738|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def297]
imlib2-1.12.5/src/modules/loaders/loader_tga.c:560:23: warning[-Wanalyzer-malloc-leak]: leak of 'bufptr'
imlib2-1.12.5/src/modules/loaders/loader_tga.c:534:11: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_tga.c:535:8: branch_false: following 'false' branch (when 'buf' is non-NULL)...
imlib2-1.12.5/src/modules/loaders/loader_tga.c:539:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_tga.c:543:17: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_tga.c:543:17: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_tga.c:548:21: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_tga.c:560:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_tga.c:560:12: branch_true: following 'true' branch...
imlib2-1.12.5/src/modules/loaders/loader_tga.c:560:23: branch_true: ...to here
imlib2-1.12.5/src/modules/loaders/loader_tga.c:560:23: throw: if '__imlib_LoadProgressRows' throws an exception...
imlib2-1.12.5/src/modules/loaders/loader_tga.c:560:23: danger: 'bufptr' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  558|   
#  559|           /* report progress every row */
#  560|->         if (im->lc && __imlib_LoadProgressRows(im, y, 1))
#  561|               QUIT_WITH_RC(LOAD_BREAK);
#  562|       }

Error: GCC_ANALYZER_WARNING (CWE-465): [#def298]
imlib2-1.12.5/src/modules/loaders/loader_tiff.c:460:8: warning[-Wanalyzer-deref-before-check]: check of 'im' for NULL after already dereferencing it
imlib2-1.12.5/src/modules/loaders/loader_tiff.c:361:1: enter_function: entry to '_load'
imlib2-1.12.5/src/modules/loaders/loader_tiff.c:373:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_tiff.c:376:5: call_function: inlined call to 'mm_init' from '_load'
imlib2-1.12.5/src/modules/loaders/loader_tiff.c:384:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_tiff.c:387:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_tiff.c:388:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_tiff.c:393:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_tiff.c:394:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_tiff.c:397:5: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_tiff.c:399:8: branch_false: following 'false' branch...
imlib2-1.12.5/src/modules/loaders/loader_tiff.c:405:13: branch_false: ...to here
imlib2-1.12.5/src/modules/loaders/loader_tiff.c:460:8: danger: pointer 'im' is checked for NULL here but it was already dereferenced at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1)
#  458|       if (rast)
#  459|           _TIFFfree(rast);
#  460|->     if (rgba_image.image)
#  461|           TIFFRGBAImageEnd((TIFFRGBAImage *) & rgba_image);
#  462|       if (tif)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def299]
imlib2-1.12.5/src/modules/loaders/loader_xbm.c:268:12: warning[-Wanalyzer-malloc-leak]: leak of 'bname'
imlib2-1.12.5/src/modules/loaders/loader_xbm.c:227:13: acquire_memory: allocated here
imlib2-1.12.5/src/modules/loaders/loader_xbm.c:268:12: danger: 'bname' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  266|   
#  267|     quit:
#  268|->     return rc;
#  269|   }
#  270|   

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-136.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameimlib2-1.12.5-1.fc44
store-results-to/tmp/tmp_up4eco2/imlib2-1.12.5-1.fc44.tar.xz
time-created2026-01-08 17:08:09
time-finished2026-01-08 17:10:10
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp_up4eco2/imlib2-1.12.5-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp_up4eco2/imlib2-1.12.5-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9