imlib2-1.11.1-7.fc41
List of Defects
Error: CPPCHECK_WARNING: [#def1]
imlib2-1.11.1-build/imlib2-1.11.1/src/bin/imlib2_grab.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def2]
imlib2-1.11.1-build/imlib2-1.11.1/src/bin/imlib2_load.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def3]
imlib2-1.11.1-build/imlib2-1.11.1/src/bin/imlib2_load.c:120:4: warning[deadcode.DeadStores]: Value stored to 'fd' is never read
# 118|
# 119| im = NULL;
# 120|-> fd = -1;
# 121| fdata = MAP_FAILED;
# 122|
Error: CLANG_WARNING: [#def4]
imlib2-1.11.1-build/imlib2-1.11.1/src/bin/imlib2_load.c:135:14: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value
# 133|
# 134| quit:
# 135|-> if (fdata != MAP_FAILED)
# 136| munmap(fdata, st.st_size);
# 137| return im;
Error: CPPCHECK_WARNING: [#def5]
imlib2-1.11.1-build/imlib2-1.11.1/src/bin/imlib2_show.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def6]
imlib2-1.11.1-build/imlib2-1.11.1/src/bin/imlib2_view.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def7]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/api.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/api.c: scope_hint: In function 'imlib_context_push'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/api.c:204:18: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'item'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/api.c:11: included_from: Included from here.
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/api.c:200:4: note: in expansion of macro 'CHECK_PARAM_POINTER'
# 202|
# 203| item = malloc(sizeof(ImlibContextItem));
# 204|-> item->context = ctx;
# 205| item->below = contexts;
# 206| contexts = item;
Error: CPPCHECK_WARNING: [#def9]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/api_text.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def10]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/api_x11.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def11]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/blend.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def12]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/color_helpers.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def13]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/colormod.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def14]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_ellipse.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def15]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_line.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def16]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c: scope_hint: In function '__imlib_Polygon_FillToData_AA'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:465:7: warning[-Wanalyzer-malloc-leak]: leak of 's1'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1794:4: note: in expansion of macro 'DE_INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1431:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1431:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1431:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1431:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1431:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1431:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1431:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1431:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1794:4: note: in expansion of macro 'DE_INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1794:4: note: in expansion of macro 'DE_INIT_POLY'
# 463| s0 += clx; \
# 464| free(s0); \
# 465|-> s1 += clx; \
# 466| free(s1); \
# 467| } while (0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:466:4: warning[-Wanalyzer-malloc-leak]: leak of 's0'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1410:4: note: in expansion of macro 'DE_INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1830:9: note: in expansion of macro 'CLIP'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1114:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1114:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1114:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1114:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1114:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1114:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1114:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1114:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1410:4: note: in expansion of macro 'DE_INIT_POLY'
# 464| free(s0); \
# 465| s1 += clx; \
# 466|-> free(s1); \
# 467| } while (0)
# 468|
Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c: scope_hint: In function '__imlib_Polygon_FillToData'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:466:4: warning[-Wanalyzer-malloc-leak]: leak of 's1'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1410:4: note: in expansion of macro 'DE_INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1: included_from: Included from here.
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1830:9: note: in expansion of macro 'CLIP'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1114:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1114:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1114:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1114:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1114:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1114:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1114:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1114:4: note: in expansion of macro 'INIT_POLY'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_polygon.c:1410:4: note: in expansion of macro 'DE_INIT_POLY'
# 464| free(s0); \
# 465| s1 += clx; \
# 466|-> free(s1); \
# 467| } while (0)
# 468|
Error: CPPCHECK_WARNING: [#def20]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/draw_rectangle.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def21]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/dynamic_filters.c: scope_hint: In function '__imlib_LoadFilter'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/dynamic_filters.c:35:18: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '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): [#def22]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/dynamic_filters.c: scope_hint: In function '__imlib_dynamic_filters_init'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/dynamic_filters.c:88:27: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'filters'
# 86| MALLOCSHOW;
# 87| filters = malloc(sizeof(ImlibExternalFilter));
# 88|-> filters->filename = (char *)"";
# 89| filters->next = NULL;
# 90| ptr = filters;
Error: CPPCHECK_WARNING: [#def23]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/file.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-688): [#def24]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/file.c:241:18: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL '*<unknown>' where non-null expected
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/file.c:8: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 2 of 'strcmp' must be non-null
# 239| for (i = 0; i < dirlen - 1; i++)
# 240| {
# 241|-> if (strcmp(names[i], names[i + 1]) > 0)
# 242| {
# 243| char *tmp;
Error: GCC_ANALYZER_WARNING (CWE-457): [#def25]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/file.c: scope_hint: In function '__imlib_FileDir'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/file.c:241:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*<unknown>'
# 239| for (i = 0; i < dirlen - 1; i++)
# 240| {
# 241|-> if (strcmp(names[i], names[i + 1]) > 0)
# 242| {
# 243| char *tmp;
Error: CPPCHECK_WARNING: [#def26]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/filter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING (CWE-758): [#def27]
imlib2-1.11.1-build/imlib2-1.11.1/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): [#def28]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/filter.c:220: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 218| y);
# 219| r /= rd;
# 220|-> R_VAL(p2) = SATURATE(r);
# 221| }
# 222| if (gd)
Error: CPPCHECK_WARNING (CWE-758): [#def29]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/filter.c:227: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 225| y);
# 226| g /= gd;
# 227|-> G_VAL(p2) = SATURATE(g);
# 228| }
# 229| if (bd)
Error: CPPCHECK_WARNING (CWE-758): [#def30]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/filter.c:234: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 232| y);
# 233| b /= bd;
# 234|-> B_VAL(p2) = SATURATE(b);
# 235| }
# 236| p1++;
Error: CPPCHECK_WARNING: [#def31]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/font_draw.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING (CWE-190): [#def32]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/font_draw.c:375: error[integerOverflow]: Signed integer overflow for expression 'tmp<<24'.
# 373| tmp = (tmp > 256) ? 256 : tmp;
# 374| *dst_ptr &= 0x00ffffff;
# 375|-> *dst_ptr |= (tmp << 24);
# 376| }
# 377|
Error: CPPCHECK_WARNING: [#def33]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/font_load.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-688): [#def34]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/font_load.c: scope_hint: In function '__imlib_font_load_joined'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/font_load.c:63:4: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'name' where non-null expected
<built-in>: note: argument 1 of '__builtin_memcpy' must be non-null
# 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-476): [#def35]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/font_load.c: scope_hint: In function '__imlib_font_load'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/font_load.c:190:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'fn'
# 188| }
# 189|
# 190|-> fn->file = strdup(file);
# 191| fn->name = strdup(file);
# 192| fn->size = size;
Error: CPPCHECK_WARNING (CWE-401): [#def36]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/font_load.c:374: error[memleakOnRealloc]: Common realloc mistake: 'fpath' nulled but not freed upon failure
# 372| fpath = malloc(sizeof(char *));
# 373| else
# 374|-> fpath = realloc(fpath, (fpath_num * sizeof(char *)));
# 375| fpath[fpath_num - 1] = strdup(path);
# 376| }
Error: CPPCHECK_WARNING (CWE-401): [#def37]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/font_load.c:392: error[memleakOnRealloc]: Common realloc mistake: 'fpath' nulled but not freed upon failure
# 390| fpath[j] = fpath[j + 1];
# 391| if (fpath_num > 0)
# 392|-> fpath = realloc(fpath, fpath_num * sizeof(char *));
# 393| else
# 394| {
Error: GCC_ANALYZER_WARNING (CWE-122): [#def38]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/font_load.c: scope_hint: In function '__imlib_font_del_font_path'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/font_load.c:392:25: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
# 390| fpath[j] = fpath[j + 1];
# 391| if (fpath_num > 0)
# 392|-> fpath = realloc(fpath, fpath_num * sizeof(char *));
# 393| else
# 394| {
Error: GCC_ANALYZER_WARNING (CWE-688): [#def39]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/font_load.c: scope_hint: In function '__imlib_font_list_fonts'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/font_load.c:441:19: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'path' where non-null expected
<built-in>: note: argument 1 of '__builtin_sprintf' must be non-null
# 439| {
# 440| path = malloc(strlen(fpath[i]) + strlen(dir[j]) + 2);
# 441|-> sprintf(path, "%s/%s", fpath[i], dir[j]);
# 442| /* trim .ttf if it is there */
# 443| if ((p = strrchr(dir[j], '.')))
Error: CPPCHECK_WARNING (CWE-401): [#def40]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/font_load.c:457: error[memleakOnRealloc]: Common realloc mistake: 'list' nulled but not freed upon failure
# 455| l++;
# 456| if (list)
# 457|-> list = realloc(list, sizeof(char *) * l);
# 458| else
# 459| list = malloc(sizeof(char *));
Error: GCC_ANALYZER_WARNING (CWE-476): [#def41]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/font_load.c:460:46: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'list'
# 458| else
# 459| list = malloc(sizeof(char *));
# 460|-> list[l - 1] = strdup(dir[j]);
# 461| }
# 462| }
Error: CPPCHECK_WARNING: [#def42]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/font_main.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def43]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/font_query.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def44]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/grad.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def45]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/image.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/image.c:156:7: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
# 154|
# 155| fi = calloc(1, sizeof(ImlibImageFileInfo));
# 156|-> if (!fi)
# 157| return -1;
# 158|
Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/image.c: scope_hint: In function '__imlib_ImageFileContextPush'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/image.c:156:7: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(file)'
# 154|
# 155| fi = calloc(1, sizeof(ImlibImageFileInfo));
# 156|-> if (!fi)
# 157| return -1;
# 158|
Error: CLANG_WARNING: [#def48]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/image.c:259:4: warning[deadcode.DeadStores]: Value stored to 'im' is never read
# 257| ImlibImage *im, *im_prev;
# 258|
# 259|-> im = im_del;
# 260| DP("%s: %p: '%s' frame %d\n", __func__, im, im->fi->name, im->frame);
# 261|
Error: CLANG_WARNING: [#def49]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/image.c:727:9: warning[unix.Malloc]: Potential memory leak
# 725|
# 726| __imlib_ImageFileContextPush(im, strdup(file));
# 727|-> rc = __imlib_FileContextOpen(im->fi, NULL, NULL, 0);
# 728| if (rc)
# 729| return LOAD_FAIL;
Error: CLANG_WARNING: [#def50]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/image.c:901:15: warning[unix.Malloc]: Potential memory leak
# 899|
# 900| __imlib_ImageFileContextPush(im, file ? strdup(file) : NULL);
# 901|-> im->fi->fp = fp;
# 902|
# 903| /* call the saver */
Error: GCC_ANALYZER_WARNING (CWE-476): [#def51]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/image_tags.c: scope_hint: In function '__imlib_AttachTag'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/image_tags.c:26:11: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '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-688): [#def52]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/loaders.c: scope_hint: In function '__imlib_LookupLoaderByModulePath'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/loaders.c:153:13: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL '*l.file' where non-null expected
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/loaders.c:6: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 2 of 'strcmp' must be non-null
# 151| for (l = loaders; l; l = l->next)
# 152| {
# 153|-> if (strcmp(file, l->file) == 0)
# 154| return l;
# 155| }
Error: GCC_ANALYZER_WARNING (CWE-476): [#def53]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/loaders.c: scope_hint: In function '__imlib_ProduceLoader'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/loaders.c:185:14: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'l'
# 183| l = malloc(sizeof(ImlibLoader));
# 184|
# 185|-> l->handle = dlopen(file, RTLD_NOW | RTLD_LOCAL);
# 186| if (!l->handle)
# 187| goto bail;
Error: CPPCHECK_WARNING: [#def54]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/modules.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/modules.c: scope_hint: In function '_module_paths'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/modules.c:30:23: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(&buf)'
# 28| free(*pp);
# 29| snprintf(buf, sizeof(buf), "%s/%s", PACKAGE_LIB_DIR, mdir);
# 30|-> *pp = strdup(buf);
# 31| }
# 32| }
Error: CPPCHECK_WARNING (CWE-401): [#def56]
imlib2-1.11.1-build/imlib2-1.11.1/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: CLANG_WARNING: [#def57]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/modules.c:138:4: warning[unix.Malloc]: Potential leak of memory pointed to by 'list'
# 136|
# 137| done:
# 138|-> return list;
# 139| }
# 140|
Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/modules.c: scope_hint: In function '__imlib_ModulesList'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/modules.c:138:11: warning[-Wanalyzer-malloc-leak]: leak of 'list'
# 136|
# 137| done:
# 138|-> return list;
# 139| }
# 140|
Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/object.c: scope_hint: In function '__imlib_hash_add'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/object.c:151:20: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/object.c: scope_hint: In function '__imlib_hash_add'
# 149| }
# 150|
# 151|-> hash->population++;
# 152|
# 153| return hash;
Error: CPPCHECK_WARNING: [#def60]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/rgbadraw.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def61]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/rgbadraw.c: scope_hint: In function '__imlib_FlipImageDiagonal'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/rgbadraw.c:148:18: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'to'
# 146| for (y = im->h; --y >= 0;)
# 147| {
# 148|-> *to = *from;
# 149| from++;
# 150| to += w;
Error: GCC_ANALYZER_WARNING (CWE-688): [#def62]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/rgbadraw.c: scope_hint: In function '__imlib_BlurImage'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/rgbadraw.c:186:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'as' where non-null expected
<built-in>: note: argument 1 of '__builtin_memset' must be non-null
# 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): [#def63]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/rgbadraw.c:187:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'rs' where non-null expected
<built-in>: note: argument 1 of '__builtin_memset' must be non-null
# 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): [#def64]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/rgbadraw.c:188:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'gs' where non-null expected
<built-in>: note: argument 1 of '__builtin_memset' must be non-null
# 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): [#def65]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/rgbadraw.c:189:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'bs' where non-null expected
<built-in>: note: argument 1 of '__builtin_memset' must be non-null
# 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): [#def66]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/rgbadraw.c:232:23: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'p1'
# 230| g = g / mt;
# 231| b = b / mt;
# 232|-> *p1 = PIXEL_ARGB(a, r, g, b);
# 233| p1++;
# 234| }
Error: GCC_ANALYZER_WARNING (CWE-476): [#def67]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/rgbadraw.c: scope_hint: In function '__imlib_TileImageHoriz'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/rgbadraw.c:341:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'p'
# 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): [#def68]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/rgbadraw.c:369:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'p'
# 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): [#def69]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/rgbadraw.c: scope_hint: In function '__imlib_TileImageVert'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/rgbadraw.c:420:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'p'
# 418| tmp = (a - aa) * mix;
# 419| na = aa + ((tmp + (tmp >> 8) + 0x80) >> 8);
# 420|-> *p = PIXEL_ARGB(na, nr, ng, nb);
# 421| p++;
# 422| p1++;
Error: CPPCHECK_WARNING: [#def70]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/rotate.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def71]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/scale.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def72]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-688): [#def73]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c:32:8: warning[-Wanalyzer-null-argument]: use of NULL 'function' where non-null expected
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c: scope_hint: In function '__imlib_script_parse_function'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c: scope_hint: In function '__imlib_script_parse_function'
<built-in>: scope_hint: In function '__imlib_script_parse_function'
<built-in>: note: argument 1 of '__builtin_strchr' must be non-null
# 30| __imlib_find_string(const char *haystack, const char *needle)
# 31| {
# 32|-> if (strstr(haystack, needle))
# 33| return (strstr(haystack, needle) - haystack);
# 34| return 0;
Error: GCC_ANALYZER_WARNING (CWE-476): [#def74]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c: scope_hint: In function '__imlib_stripwhitespace'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c:46:14: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'si'
# 44| for (si = so = str;;)
# 45| {
# 46|-> ch = *si++;
# 47| if (ch == '"')
# 48| in_quote = !in_quote;
Error: GCC_ANALYZER_WARNING (CWE-476): [#def75]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c: scope_hint: In function '__imlib_copystr.part.0'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c:68:23: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'rstr'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c: scope_hint: In function '__imlib_copystr.part.0'
# 66| rstr = calloc(1024, sizeof(char));
# 67| for (i = start; i <= end; i++)
# 68|-> rstr[i - start] = str[i];
# 69| return rstr;
# 70| }
Error: GCC_ANALYZER_WARNING (CWE-476): [#def76]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c: scope_hint: In function '__imlib_script_add_var'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c:115:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'curtail'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c: scope_hint: In function '__imlib_script_add_var'
# 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): [#def77]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c: scope_hint: In function '__imlib_script_parse_parameters'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c:131:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'rootptr'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c: scope_hint: In function '__imlib_script_parse_parameters'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c: scope_hint: In function '__imlib_script_parse_parameters'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c: scope_hint: In function '__imlib_script_parse_parameters'
# 129|
# 130| rootptr = malloc(sizeof(IFunctionParam));
# 131|-> rootptr->key = strdup("NO-KEY");
# 132| rootptr->type = VAR_CHAR;
# 133| rootptr->data = strdup("NO-VALUE");
Error: GCC_ANALYZER_WARNING (CWE-688): [#def78]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c:137:16: warning[-Wanalyzer-null-argument]: use of NULL 'parameters' where non-null expected
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c: scope_hint: In function '__imlib_script_parse_parameters'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c: scope_hint: In function '__imlib_script_parse_parameters'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c: scope_hint: In function '__imlib_script_parse_parameters'
<built-in>: note: argument 1 of '__builtin_strlen' must be non-null
# 135| ptr = rootptr;
# 136|
# 137|-> param_len = strlen(parameters);
# 138| for (i = 0; i <= param_len; i++)
# 139| {
Error: GCC_ANALYZER_WARNING (CWE-688): [#def79]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c:137:16: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'parameters' where non-null expected
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c: scope_hint: In function '__imlib_script_parse_parameters'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c: scope_hint: In function '__imlib_script_parse_parameters'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c: scope_hint: In function '__imlib_script_parse_parameters'
<built-in>: note: argument 1 of '__builtin_strlen' must be non-null
# 135| ptr = rootptr;
# 136|
# 137|-> param_len = strlen(parameters);
# 138| for (i = 0; i <= param_len; i++)
# 139| {
Error: GCC_ANALYZER_WARNING (CWE-476): [#def80]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c: scope_hint: In function '__imlib_script_parse'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/script.c:249:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'vars'
# 247| {
# 248| vars = malloc(sizeof(IVariable));
# 249|-> vars->ptr = NULL;
# 250| vars->next = NULL;
# 251| curtail = vars;
Error: CPPCHECK_WARNING (CWE-401): [#def81]
imlib2-1.11.1-build/imlib2-1.11.1/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-476): [#def82]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/strutils.c: scope_hint: In function '__imlib_StrSplit'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/strutils.c:39:18: warning[-Wanalyzer-null-dereference]: dereference of NULL 'lst'
# 37| lst = realloc(lst, (n + 2) * sizeof(char *));
# 38|
# 39|-> lst[n++] = strndup(s, len);
# 40| }
# 41|
Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/strutils.c:39:20: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
# 37| lst = realloc(lst, (n + 2) * sizeof(char *));
# 38|
# 39|-> lst[n++] = strndup(s, len);
# 40| }
# 41|
Error: CPPCHECK_WARNING: [#def84]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/updates.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def85]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/updates.c: scope_hint: In function '__imlib_AddUpdate.part.0'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/updates.c:156:10: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '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-688): [#def86]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/updates.c: scope_hint: In function '__imlib_DupUpdates'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/updates.c:187:4: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'uu' where non-null expected
<built-in>: note: argument 1 of '__builtin_memcpy' must be non-null
# 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): [#def87]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/updates.c:194:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'uu' where non-null expected
<built-in>: note: argument 1 of '__builtin_memcpy' must be non-null
# 192| {
# 193| uu = malloc(sizeof(ImlibUpdate));
# 194|-> memcpy(uu, u, sizeof(ImlibUpdate));
# 195| pu->next = uu;
# 196| pu = cu;
Error: CPPCHECK_WARNING: [#def88]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/x11_color.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def89]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/x11_context.c: scope_hint: In function '__imlib_NewContext'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/x11_context.c:103:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'ct'
# 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: [#def90]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/x11_grab.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def91]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/x11_pixmap.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def92]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/x11_pixmap.c: scope_hint: In function '__imlib_AddImagePixmapToCache'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/x11_pixmap.c:111:15: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'ip'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/x11_pixmap.c: scope_hint: In function '__imlib_AddImagePixmapToCache'
# 109|
# 110| ip = __imlib_ProduceImagePixmap();
# 111|-> ip->visual = x11->vis;
# 112| ip->depth = x11->depth;
# 113| ip->image = im;
Error: CLANG_WARNING: [#def93]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/x11_pixmap.c:163:62: warning[unix.Malloc]: Use of memory after it is freed
# 161| ImlibImagePixmap *ip, *ip_prev;
# 162|
# 163|-> for (ip = pixmaps, ip_prev = NULL; ip; ip_prev = ip, ip = ip->next)
# 164| {
# 165| if (ip == ip_del)
Error: CLANG_WARNING: [#def94]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/x11_pixmap.c:168:33: warning[unix.Malloc]: Use of memory after it is freed
# 166| {
# 167| if (ip_prev)
# 168|-> ip_prev->next = ip->next;
# 169| else
# 170| pixmaps = ip->next;
Error: CLANG_WARNING: [#def95]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/x11_pixmap.c:170:27: warning[unix.Malloc]: Use of memory after it is freed
# 168| ip_prev->next = ip->next;
# 169| else
# 170|-> pixmaps = ip->next;
# 171| return;
# 172| }
Error: CLANG_WARNING: [#def96]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/x11_pixmap.c:374:4: warning[deadcode.DeadStores]: Value stored to 'ip' is never read
# 372| dw, dh, antialias, hiq, 0, dither_mask, mat, cmod,
# 373| OP_COPY);
# 374|-> ip = __imlib_AddImagePixmapToCache(x11, im, pmap, mask,
# 375| dw, dh, sx, sy, sw, sh,
# 376| antialias, hiq, dither_mask, mod_count);
Error: CPPCHECK_WARNING: [#def97]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/x11_rend.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def98]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/x11_rgba.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def99]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/x11_rgba.c: scope_hint: In function '__imlib_RGBA_init'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/x11_rgba.c:2604:35: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '_dither_666r'
# 2602| for (y = 0; y < 256; y++)
# 2603| {
# 2604|-> _dither_666r[y] = (uint8_t) (((y * 6) >> 8) * 6 * 6);
# 2605| _dither_666g[y] = (uint8_t) (((y * 6) >> 8) * 6);
# 2606| _dither_666b[y] = (uint8_t) (((y * 6) >> 8));
Error: GCC_ANALYZER_WARNING (CWE-476): [#def100]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/x11_rgba.c:2605:35: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '_dither_666g'
# 2603| {
# 2604| _dither_666r[y] = (uint8_t) (((y * 6) >> 8) * 6 * 6);
# 2605|-> _dither_666g[y] = (uint8_t) (((y * 6) >> 8) * 6);
# 2606| _dither_666b[y] = (uint8_t) (((y * 6) >> 8));
# 2607| }
Error: GCC_ANALYZER_WARNING (CWE-476): [#def101]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/x11_rgba.c:2606:35: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '_dither_666b'
# 2604| _dither_666r[y] = (uint8_t) (((y * 6) >> 8) * 6 * 6);
# 2605| _dither_666g[y] = (uint8_t) (((y * 6) >> 8) * 6);
# 2606|-> _dither_666b[y] = (uint8_t) (((y * 6) >> 8));
# 2607| }
# 2608| for (y = 0; y < DM_Y; y++)
Error: CPPCHECK_WARNING: [#def102]
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/x11_ximage.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING (CWE-401): [#def103]
imlib2-1.11.1-build/imlib2-1.11.1/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: CPPCHECK_WARNING: [#def104]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/filters/filter_bumpmap.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def105]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/filters/filter_bumpmap.c: scope_hint: In function 'init'
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/filters/filter_bumpmap.c:263:24: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '*info.filters'
# 261| info->filters = malloc(sizeof(char *) * i);
# 262| while (--i >= 0)
# 263|-> info->filters[i] = strdup(filters[i]);
# 264| }
# 265|
Error: CPPCHECK_WARNING: [#def106]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/filters/filter_colormod.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def107]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/filters/filter_test.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def108]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/decompress_load.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def109]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_bmp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-457): [#def110]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_bmp.c: scope_hint: In function '_load'
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_bmp.c:432:44: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'argbCmap[<unknown>]'
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_bmp.c:194:17: note: in expansion of macro 'WORD_LE_32'
# 430| byte = *buffer_ptr++;
# 431| k = (byte >> 7) & 1;
# 432|-> *imdata++ = argbCmap[k];
# 433| byte <<= 1;
# 434| }
Error: GCC_ANALYZER_WARNING (CWE-457): [#def111]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_bmp.c:473:27: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'argbCmap[<unknown>]'
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_bmp.c:194:17: note: in expansion of macro 'WORD_LE_32'
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_bmp.c:11: included_from: Included from here.
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/Imlib2_Loader.h:56:24: note: in definition of macro 'SWAP_LE_32'
# 471| goto bail_bc4;
# 472|
# 473|-> t1 = argbCmap[byte2 >> 4];
# 474| t2 = argbCmap[byte2 & 0xF];
# 475| for (j = 0; j < l; j++)
Error: GCC_ANALYZER_WARNING (CWE-457): [#def112]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_bmp.c:525:54: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'argbCmap[<unknown>]'
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_bmp.c:194:17: note: in expansion of macro 'WORD_LE_32'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/Imlib2_Loader.h:56:24: note: in definition of macro 'SWAP_LE_32'
# 523| DD("%3d %3d: %d/%d: %2d %2d\n",
# 524| x, y, j, l, byte >> 4, byte & 0xf);
# 525|-> *imdata++ = argbCmap[byte >> 4];
# 526| if (++j < l)
# 527| *imdata++ = argbCmap[byte & 0xF];
Error: GCC_ANALYZER_WARNING (CWE-457): [#def113]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_bmp.c:557:44: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'argbCmap[k]'
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_bmp.c:194:17: note: in expansion of macro 'WORD_LE_32'
# 555| byte = *buffer_ptr++;
# 556| k = (byte & 0xF0) >> 4;
# 557|-> *imdata++ = argbCmap[k];
# 558| byte <<= 4;
# 559| }
Error: GCC_ANALYZER_WARNING (CWE-457): [#def114]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_bmp.c:589:30: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'argbCmap[<unknown>]'
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_bmp.c:194:17: note: in expansion of macro 'WORD_LE_32'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/Imlib2_Loader.h:56:24: note: in definition of macro 'SWAP_LE_32'
# 587| if (byte1)
# 588| {
# 589|-> pixel = argbCmap[byte2];
# 590| l = byte1;
# 591| if (x + l > w)
Error: GCC_ANALYZER_WARNING (CWE-457): [#def115]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_bmp.c:637:54: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'argbCmap[<unknown>]'
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_bmp.c:194:17: note: in expansion of macro 'WORD_LE_32'
imlib2-1.11.1-build/imlib2-1.11.1/src/lib/Imlib2_Loader.h:56:24: note: in definition of macro 'SWAP_LE_32'
# 635| DD("%3d %3d: %d/%d: %2d\n",
# 636| x, y, j, l, byte);
# 637|-> *imdata++ = argbCmap[byte];
# 638| }
# 639| x += l;
Error: GCC_ANALYZER_WARNING (CWE-457): [#def116]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_bmp.c:664:44: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'argbCmap[<unknown>]'
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_bmp.c:194:17: note: in expansion of macro 'WORD_LE_32'
# 662| {
# 663| byte = *buffer_ptr++;
# 664|-> *imdata++ = argbCmap[byte];
# 665| }
# 666| imdata -= w * 2;
Error: CLANG_WARNING: [#def117]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_gif.c:293:32: warning[core.NullDereference]: Array access results in a null pointer dereference
# 291| for (j = 0; j < im->w; j++)
# 292| {
# 293|-> *ptr++ = colormap[rows[i][j]];
# 294| }
# 295|
Error: GCC_ANALYZER_WARNING (CWE-401): [#def118]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_gif.c: scope_hint: In function '_load'
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_gif.c:310:9: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
# 308| for (i = 0; i < im->h; i++)
# 309| free(rows[i]);
# 310|-> free(rows);
# 311| }
# 312|
Error: GCC_ANALYZER_WARNING (CWE-401): [#def119]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_gif.c:319:11: warning[-Wanalyzer-malloc-leak]: leak of 'rows'
# 317| #endif
# 318|
# 319|-> return rc;
# 320| }
# 321|
Error: CPPCHECK_WARNING: [#def120]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_id3.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def121]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_id3.c: scope_hint: In function 'context_create'
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_id3.c:47:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'node'
# 45| int last_id = INT_MAX;
# 46|
# 47|-> node->refcount = 1;
# 48| {
# 49| int fd;
Error: GCC_ANALYZER_WARNING (CWE-476): [#def122]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_id3.c: scope_hint: In function 'get_options'
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_id3.c:301:16: warning[-Wanalyzer-null-dereference]: dereference of NULL 'ctx'
# 299| index = htag->val;
# 300| }
# 301|-> if (index > id3_tag_get_numframes(ctx->tag) ||
# 302| (index == 0 && id3_tag_get_numframes(ctx->tag) < 1))
# 303| {
Error: CPPCHECK_WARNING: [#def123]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_jpeg.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def124]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_jpeg.c:78:4: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 76| ExifInfo ei = { 0 };
# 77|
# 78|-> rc = LOAD_FAIL;
# 79|
# 80| /* set up error handling */
Error: CLANG_WARNING: [#def125]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_jpeg.c:272:4: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 270| return LOAD_FAIL;
# 271|
# 272|-> rc = LOAD_FAIL;
# 273|
# 274| /* set up error handling */
Error: CPPCHECK_WARNING: [#def126]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_lbm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def127]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_lbm.c:308:18: warning[core.NullDereference]: Array access results in an undefined pointer dereference
# 306| {
# 307| l = l << 1;
# 308|-> if (plane[i][o] & bit)
# 309| l = l | 1;
# 310| }
Error: CLANG_WARNING: [#def128]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_lbm.c:312:38: warning[core.NullDereference]: Array access results in an undefined pointer dereference
# 310| }
# 311| a = (ilbm->mask == 0
# 312|-> || (ilbm->mask == 1 && (plane[ilbm->depth][o] & bit))
# 313| || ilbm->mask == 2) ? 0xff : 0x00;
# 314|
Error: CLANG_WARNING: [#def129]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_lbm.c:330:26: warning[core.BitwiseShift]: Right operand is negative in left shift
# 328| else if (ilbm->ham)
# 329| {
# 330|-> v = l & ((1 << (ilbm->depth - 2)) - 1);
# 331| h = (l & ~v) >> (ilbm->depth - 2);
# 332|
Error: CLANG_WARNING: [#def130]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_lbm.c:362:26: warning[core.BitwiseShift]: Right operand is negative in left shift
# 360| else if (ilbm->hbrite)
# 361| {
# 362|-> v = l & ((1 << (ilbm->depth - 1)) - 1);
# 363| h = (l & ~v) >> (ilbm->depth - 1);
# 364|
Error: CPPCHECK_WARNING: [#def131]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_png.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: COMPILER_WARNING (CWE-758): [#def132]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_png.c: scope_hint: In function '_load'
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_png.c:283:24: 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-476): [#def133]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_png.c: scope_hint: In function '_save'
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_png.c:730:39: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'misc.data'
/usr/include/libpng16/pngconf.h:51: included_from: Included from here.
/usr/include/libpng16/png.h:335: included_from: Included from here.
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_png.c:4: included_from: Included from here.
# 728| uint32_t pixel = imdata[x];
# 729|
# 730|-> misc.data[j++] = PIXEL_R(pixel);
# 731| misc.data[j++] = PIXEL_G(pixel);
# 732| misc.data[j++] = PIXEL_B(pixel);
Error: CPPCHECK_WARNING: [#def134]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_pnm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def135]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_pnm.c:303:10: warning[core.UndefinedBinaryOperatorResult]: The left operand of '>' is a garbage value
# 301| }
# 302|
# 303|-> if (v > 255)
# 304| goto quit;
# 305|
Error: CLANG_WARNING: [#def136]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_pnm.c:311:10: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
# 309| rc = LOAD_BADIMAGE; /* Format accepted */
# 310|
# 311|-> im->w = w;
# 312| im->h = h;
# 313| if (!IMAGE_DIMENSIONS_OK(w, h))
Error: CLANG_WARNING: [#def137]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_pnm.c:649:14: warning[unix.StdCLibraryFunctions]: The 1st argument to 'fwrite' is out of the accepted range; It should be a buffer with size equal to or greater than the value of the 2nd argument (which is 4) times the 3rd argument (which is 1)
# 647| bptr += 4;
# 648| }
# 649|-> fwrite(buf, im->w * 4, 1, f);
# 650|
# 651| if (im->lc && __imlib_LoadProgressRows(im, y, 1))
Error: CLANG_WARNING: [#def138]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_pnm.c:649:14: warning[unix.StdCLibraryFunctions]: The 1st argument to 'fwrite' is out of the accepted range; It should be a buffer with size equal to or greater than the value of the 2nd argument (which is 8) times the 3rd argument (which is 1)
# 647| bptr += 4;
# 648| }
# 649|-> fwrite(buf, im->w * 4, 1, f);
# 650|
# 651| if (im->lc && __imlib_LoadProgressRows(im, y, 1))
Error: CLANG_WARNING: [#def139]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_ps.c:116:4: warning[deadcode.DeadStores]: Value stored to 'src' is never read
# 114| }
# 115|
# 116|-> src = pdata;
# 117| imdata = im->data;
# 118|
Error: CPPCHECK_WARNING: [#def140]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_tiff.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-465): [#def141]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_tiff.c: scope_hint: In function '_load'
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_tiff.c:443:7: warning[-Wanalyzer-deref-before-check]: check of 'im' for NULL after already dereferencing it
# 441| if (rast)
# 442| _TIFFfree(rast);
# 443|-> if (rgba_image.image)
# 444| TIFFRGBAImageEnd((TIFFRGBAImage *) & rgba_image);
# 445| if (tif)
Error: GCC_ANALYZER_WARNING (CWE-465): [#def142]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_webp.c: scope_hint: In function '_save'
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_webp.c:161:7: warning[-Wanalyzer-deref-before-check]: check of 'fdata' for NULL after already dereferencing it
# 159|
# 160| quit:
# 161|-> if (fdata)
# 162| WebPFree(fdata);
# 163|
Error: CPPCHECK_WARNING: [#def143]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_xbm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def144]
imlib2-1.11.1-build/imlib2-1.11.1/src/modules/loaders/loader_xpm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Scan Properties
analyzer-version-clang | 18.1.7 |
analyzer-version-cppcheck | 2.14.2 |
analyzer-version-gcc | 14.1.1 |
analyzer-version-gcc-analyzer | 14.1.1 |
analyzer-version-shellcheck | 0.10.0 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-246.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | imlib2-1.11.1-7.fc41 |
store-results-to | /tmp/tmpjtkewl3v/imlib2-1.11.1-7.fc41.tar.xz |
time-created | 2024-07-03 13:14:10 |
time-finished | 2024-07-03 13:16:05 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpjtkewl3v/imlib2-1.11.1-7.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpjtkewl3v/imlib2-1.11.1-7.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |