Error: GCC_ANALYZER_WARNING (CWE-401): [#def1] Pillow-11.3.0/src/_imaging.c:267:15: warning[-Wanalyzer-malloc-leak]: leak of ‘schema’ Pillow-11.3.0/src/_imaging.c:266:31: acquire_memory: allocated here Pillow-11.3.0/src/_imaging.c:267:15: throw: if ‘export_imaging_schema’ throws an exception... Pillow-11.3.0/src/_imaging.c:267:15: danger: ‘schema’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) # 265| struct ArrowSchema *schema = # 266| (struct ArrowSchema *)calloc(1, sizeof(struct ArrowSchema)); # 267|-> int err = export_imaging_schema(self->image, schema); # 268| if (err == 0) { # 269| return PyCapsule_New(schema, "arrow_schema", ReleaseArrowSchemaPyCapsule); Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] Pillow-11.3.0/src/_imaging.c:289:15: warning[-Wanalyzer-malloc-leak]: leak of ‘array’ Pillow-11.3.0/src/_imaging.c:288:30: acquire_memory: allocated here Pillow-11.3.0/src/_imaging.c:289:15: throw: if ‘export_imaging_array’ throws an exception... Pillow-11.3.0/src/_imaging.c:289:15: danger: ‘array’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0) # 287| struct ArrowArray *array = # 288| (struct ArrowArray *)calloc(1, sizeof(struct ArrowArray)); # 289|-> int err = export_imaging_array(self->image, array); # 290| if (err == 0) { # 291| return PyCapsule_New(array, "arrow_array", ReleaseArrowArrayPyCapsule); Error: GCC_ANALYZER_WARNING (CWE-401): [#def3] Pillow-11.3.0/src/_imaging.c:432:11: warning[-Wanalyzer-malloc-leak]: leak of ‘list’ Pillow-11.3.0/src/_imaging.c:414:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imaging.c:419:9: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:427:12: acquire_memory: allocated here Pillow-11.3.0/src/_imaging.c:428:8: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)... Pillow-11.3.0/src/_imaging.c:432:11: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:432:11: throw: if ‘PySequence_Fast’ throws an exception... Pillow-11.3.0/src/_imaging.c:432:11: danger: ‘list’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2) # 430| } # 431| # 432|-> seq = PySequence_Fast(arg, must_be_sequence); # 433| if (!seq) { # 434| free(list); Error: GCC_ANALYZER_WARNING (CWE-401): [#def4] Pillow-11.3.0/src/_imaging.c:444:25: warning[-Wanalyzer-malloc-leak]: leak of ‘list’ Pillow-11.3.0/src/_imaging.c:395:1: enter_function: entry to ‘getlist’ Pillow-11.3.0/src/_imaging.c:414:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imaging.c:419:9: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:427:12: acquire_memory: allocated here Pillow-11.3.0/src/_imaging.c:428:8: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)... Pillow-11.3.0/src/_imaging.c:432:11: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:433:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imaging.c:433:8: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:438:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/_imaging.c:439:14: call_function: inlined call to ‘_Py_TYPE’ from ‘getlist’ Pillow-11.3.0/src/_imaging.c:439:14: branch_true: following ‘true’ branch... Pillow-11.3.0/src/_imaging.c:439:9: branch_true: ...to here Pillow-11.3.0/src/_imaging.c:444:25: throw: if ‘PyLong_AsLong’ throws an exception... Pillow-11.3.0/src/_imaging.c:444:25: danger: ‘list’ leaks here; was allocated at [(4)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/3) # 442| switch (type) { # 443| case TYPE_UINT8: # 444|-> itemp = PyLong_AsLong(op); # 445| list[i] = CLIP8(itemp); # 446| break; Error: GCC_ANALYZER_WARNING (CWE-401): [#def5] Pillow-11.3.0/src/_imaging.c:448:25: warning[-Wanalyzer-malloc-leak]: leak of ‘list’ Pillow-11.3.0/src/_imaging.c:395:1: enter_function: entry to ‘getlist’ Pillow-11.3.0/src/_imaging.c:414:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imaging.c:419:9: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:427:12: acquire_memory: allocated here Pillow-11.3.0/src/_imaging.c:428:8: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)... Pillow-11.3.0/src/_imaging.c:432:11: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:433:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imaging.c:433:8: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:438:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/_imaging.c:439:14: call_function: inlined call to ‘_Py_TYPE’ from ‘getlist’ Pillow-11.3.0/src/_imaging.c:439:14: branch_true: following ‘true’ branch... Pillow-11.3.0/src/_imaging.c:439:9: branch_true: ...to here Pillow-11.3.0/src/_imaging.c:448:25: throw: if ‘PyLong_AsLong’ throws an exception... Pillow-11.3.0/src/_imaging.c:448:25: danger: ‘list’ leaks here; was allocated at [(4)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/3) # 446| break; # 447| case TYPE_INT32: # 448|-> itemp = PyLong_AsLong(op); # 449| memcpy(list + i * sizeof(INT32), &itemp, sizeof(itemp)); # 450| break; Error: GCC_ANALYZER_WARNING (CWE-401): [#def6] Pillow-11.3.0/src/_imaging.c:452:34: warning[-Wanalyzer-malloc-leak]: leak of ‘list’ Pillow-11.3.0/src/_imaging.c:395:1: enter_function: entry to ‘getlist’ Pillow-11.3.0/src/_imaging.c:414:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imaging.c:419:9: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:427:12: acquire_memory: allocated here Pillow-11.3.0/src/_imaging.c:428:8: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)... Pillow-11.3.0/src/_imaging.c:432:11: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:433:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imaging.c:433:8: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:438:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/_imaging.c:439:14: call_function: inlined call to ‘_Py_TYPE’ from ‘getlist’ Pillow-11.3.0/src/_imaging.c:439:14: branch_true: following ‘true’ branch... Pillow-11.3.0/src/_imaging.c:439:9: branch_true: ...to here Pillow-11.3.0/src/_imaging.c:452:34: throw: if ‘PyFloat_AsDouble’ throws an exception... Pillow-11.3.0/src/_imaging.c:452:34: danger: ‘list’ leaks here; was allocated at [(4)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/3) # 450| break; # 451| case TYPE_FLOAT32: # 452|-> ftemp = (FLOAT32)PyFloat_AsDouble(op); # 453| memcpy(list + i * sizeof(ftemp), &ftemp, sizeof(ftemp)); # 454| break; Error: GCC_ANALYZER_WARNING (CWE-401): [#def7] Pillow-11.3.0/src/_imaging.c:456:25: warning[-Wanalyzer-malloc-leak]: leak of ‘list’ Pillow-11.3.0/src/_imaging.c:395:1: enter_function: entry to ‘getlist’ Pillow-11.3.0/src/_imaging.c:414:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imaging.c:419:9: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:427:12: acquire_memory: allocated here Pillow-11.3.0/src/_imaging.c:428:8: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)... Pillow-11.3.0/src/_imaging.c:432:11: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:433:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imaging.c:433:8: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:438:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/_imaging.c:439:14: call_function: inlined call to ‘_Py_TYPE’ from ‘getlist’ Pillow-11.3.0/src/_imaging.c:439:14: branch_true: following ‘true’ branch... Pillow-11.3.0/src/_imaging.c:439:9: branch_true: ...to here Pillow-11.3.0/src/_imaging.c:456:25: throw: if ‘PyFloat_AsDouble’ throws an exception... Pillow-11.3.0/src/_imaging.c:456:25: danger: ‘list’ leaks here; was allocated at [(4)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/3) # 454| break; # 455| case TYPE_DOUBLE: # 456|-> dtemp = PyFloat_AsDouble(op); # 457| memcpy(list + i * sizeof(dtemp), &dtemp, sizeof(dtemp)); # 458| break; Error: GCC_ANALYZER_WARNING (CWE-401): [#def8] Pillow-11.3.0/src/_imaging.c:464:9: warning[-Wanalyzer-malloc-leak]: leak of ‘list’ Pillow-11.3.0/src/_imaging.c:395:1: enter_function: entry to ‘getlist’ Pillow-11.3.0/src/_imaging.c:414:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imaging.c:419:9: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:427:12: acquire_memory: allocated here Pillow-11.3.0/src/_imaging.c:428:8: branch_false: following ‘false’ branch (when ‘list’ is non-NULL)... Pillow-11.3.0/src/_imaging.c:432:11: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:433:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imaging.c:433:8: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:462:5: call_function: inlined call to ‘Py_DECREF’ from ‘getlist’ Pillow-11.3.0/src/_imaging.c:464:9: branch_true: ...to here Pillow-11.3.0/src/_imaging.c:464:9: throw: if ‘PyErr_Occurred’ throws an exception... Pillow-11.3.0/src/_imaging.c:464:9: danger: ‘list’ leaks here; was allocated at [(4)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/3) # 462| Py_DECREF(seq); # 463| # 464|-> if (PyErr_Occurred()) { # 465| free(list); # 466| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] Pillow-11.3.0/src/_imaging.c:2367:5: warning[-Wanalyzer-malloc-leak]: leak of ‘xprofile’ Pillow-11.3.0/src/_imaging.c:2358:16: acquire_memory: allocated here Pillow-11.3.0/src/_imaging.c:2361:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imaging.c:2367:5: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:2367:5: throw: if ‘ImagingGetProjection’ throws an exception... Pillow-11.3.0/src/_imaging.c:2367:5: danger: ‘xprofile’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0) # 2365| } # 2366| # 2367|-> ImagingGetProjection( # 2368| self->image, (unsigned char *)xprofile, (unsigned char *)yprofile # 2369| ); Error: GCC_ANALYZER_WARNING (CWE-401): [#def10] Pillow-11.3.0/src/_imaging.c:2367:5: warning[-Wanalyzer-malloc-leak]: leak of ‘yprofile’ Pillow-11.3.0/src/_imaging.c:2359:16: acquire_memory: allocated here Pillow-11.3.0/src/_imaging.c:2361:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imaging.c:2367:5: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:2367:5: throw: if ‘ImagingGetProjection’ throws an exception... Pillow-11.3.0/src/_imaging.c:2367:5: danger: ‘yprofile’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0) # 2365| } # 2366| # 2367|-> ImagingGetProjection( # 2368| self->image, (unsigned char *)xprofile, (unsigned char *)yprofile # 2369| ); Error: GCC_ANALYZER_WARNING (CWE-457): [#def11] Pillow-11.3.0/src/_imaging.c:2801:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘buffer’ Pillow-11.3.0/src/_imaging.c:2780:1: enter_function: entry to ‘_font_text_asBytes’ Pillow-11.3.0/src/_imaging.c:2789:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imaging.c:2795:16: call_function: inlined call to ‘PyType_HasFeature’ from ‘_font_text_asBytes’ Pillow-11.3.0/src/_imaging.c:2795:15: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imaging.c:2799:20: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:2800:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/_imaging.c:2801:9: branch_true: ...to here Pillow-11.3.0/src/_imaging.c:2801:9: danger: use of uninitialized value ‘buffer’ here # 2799| *text = calloc(len + 1, 1); # 2800| if (*text) { # 2801|-> memcpy(*text, buffer, len); # 2802| } else { # 2803| ImagingError_MemoryError(); Error: GCC_ANALYZER_WARNING (CWE-401): [#def12] Pillow-11.3.0/src/_imaging.c:3384:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ixy’ Pillow-11.3.0/src/_imaging.c:3352:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imaging.c:3358:9: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:3359:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imaging.c:3362:8: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:3362:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imaging.c:3371:18: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:3371:18: acquire_memory: allocated here Pillow-11.3.0/src/_imaging.c:3372:8: branch_false: following ‘false’ branch (when ‘ixy’ is non-NULL)... Pillow-11.3.0/src/_imaging.c:3372:8: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:3377:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/_imaging.c:3378:29: branch_true: ...to here Pillow-11.3.0/src/_imaging.c:3377:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/_imaging.c:3378:29: branch_true: ...to here Pillow-11.3.0/src/_imaging.c:3384:9: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imaging.c:3384:9: branch_false: ...to here Pillow-11.3.0/src/_imaging.c:3384:9: throw: if ‘ImagingDrawPolygon’ throws an exception... Pillow-11.3.0/src/_imaging.c:3384:9: danger: ‘ixy’ leaks here; was allocated at [(7)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/6) # 3382| free(xy); # 3383| # 3384|-> if (ImagingDrawPolygon( # 3385| self->image->image, # 3386| n, Error: GCC_ANALYZER_WARNING (CWE-401): [#def13] Pillow-11.3.0/src/_imagingcms.c:695:5: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ Pillow-11.3.0/src/_imagingcms.c:678:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imagingcms.c:682:11: branch_false: ...to here Pillow-11.3.0/src/_imagingcms.c:683:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imagingcms.c:687:11: branch_false: ...to here Pillow-11.3.0/src/_imagingcms.c:687:11: acquire_memory: allocated here Pillow-11.3.0/src/_imagingcms.c:688:8: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)... Pillow-11.3.0/src/_imagingcms.c:693:5: branch_false: ...to here Pillow-11.3.0/src/_imagingcms.c:695:5: throw: if ‘cmsMLUgetWide’ throws an exception... Pillow-11.3.0/src/_imagingcms.c:695:5: danger: ‘buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4) # 693| buf[0] = '\0'; # 694| # 695|-> cmsMLUgetWide(mlu, lc, cc, buf, len); # 696| // buf contains additional junk after \0 # 697| uni = PyUnicode_FromWideChar(buf, wcslen(buf)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def14] Pillow-11.3.0/src/_imagingft.c:1405:16: warning[-Wanalyzer-malloc-leak]: leak of ‘coords’ Pillow-11.3.0/src/_imagingft.c:1390:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imagingft.c:1394:10: branch_false: ...to here Pillow-11.3.0/src/_imagingft.c:1394:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imagingft.c:1399:18: branch_false: ...to here Pillow-11.3.0/src/_imagingft.c:1400:26: acquire_memory: allocated here Pillow-11.3.0/src/_imagingft.c:1401:8: branch_false: following ‘false’ branch (when ‘coords’ is non-NULL)... Pillow-11.3.0/src/_imagingft.c:1401:8: branch_false: ...to here Pillow-11.3.0/src/_imagingft.c:1404:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/_imagingft.c:1405:16: branch_true: ...to here Pillow-11.3.0/src/_imagingft.c:1405:16: throw: if ‘PyList_GetItemRef’ throws an exception... Pillow-11.3.0/src/_imagingft.c:1405:16: danger: ‘coords’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4) # 1403| } # 1404| for (i = 0; i < num_coords; i++) { # 1405|-> item = PyList_GetItemRef(axes, i); # 1406| if (item == NULL) { # 1407| free(coords); Error: GCC_ANALYZER_WARNING (CWE-401): [#def15] Pillow-11.3.0/src/_imagingft.c:1414:28: warning[-Wanalyzer-malloc-leak]: leak of ‘coords’ Pillow-11.3.0/src/_imagingft.c:1390:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imagingft.c:1394:10: branch_false: ...to here Pillow-11.3.0/src/_imagingft.c:1394:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imagingft.c:1399:18: branch_false: ...to here Pillow-11.3.0/src/_imagingft.c:1400:26: acquire_memory: allocated here Pillow-11.3.0/src/_imagingft.c:1401:8: branch_false: following ‘false’ branch (when ‘coords’ is non-NULL)... Pillow-11.3.0/src/_imagingft.c:1401:8: branch_false: ...to here Pillow-11.3.0/src/_imagingft.c:1404:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/_imagingft.c:1405:16: branch_true: ...to here Pillow-11.3.0/src/_imagingft.c:1406:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imagingft.c:1411:13: branch_false: ...to here Pillow-11.3.0/src/_imagingft.c:1413:19: branch_true: following ‘true’ branch... Pillow-11.3.0/src/_imagingft.c:1414:28: branch_true: ...to here Pillow-11.3.0/src/_imagingft.c:1414:28: throw: if ‘PyLong_AsLong’ throws an exception... Pillow-11.3.0/src/_imagingft.c:1414:28: danger: ‘coords’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4) # 1412| coord = PyFloat_AS_DOUBLE(item); # 1413| } else if (PyLong_Check(item)) { # 1414|-> coord = (float)PyLong_AS_LONG(item); # 1415| } else if (PyNumber_Check(item)) { # 1416| coord = PyFloat_AsDouble(item); Error: GCC_ANALYZER_WARNING (CWE-401): [#def16] Pillow-11.3.0/src/_imagingft.c:1415:20: warning[-Wanalyzer-malloc-leak]: leak of ‘coords’ Pillow-11.3.0/src/_imagingft.c:1390:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imagingft.c:1394:10: branch_false: ...to here Pillow-11.3.0/src/_imagingft.c:1394:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imagingft.c:1399:18: branch_false: ...to here Pillow-11.3.0/src/_imagingft.c:1400:26: acquire_memory: allocated here Pillow-11.3.0/src/_imagingft.c:1401:8: branch_false: following ‘false’ branch (when ‘coords’ is non-NULL)... Pillow-11.3.0/src/_imagingft.c:1401:8: branch_false: ...to here Pillow-11.3.0/src/_imagingft.c:1404:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/_imagingft.c:1405:16: branch_true: ...to here Pillow-11.3.0/src/_imagingft.c:1406:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imagingft.c:1411:13: branch_false: ...to here Pillow-11.3.0/src/_imagingft.c:1413:19: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imagingft.c:1415:20: branch_false: ...to here Pillow-11.3.0/src/_imagingft.c:1415:20: throw: if ‘PyNumber_Check’ throws an exception... Pillow-11.3.0/src/_imagingft.c:1415:20: danger: ‘coords’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4) # 1413| } else if (PyLong_Check(item)) { # 1414| coord = (float)PyLong_AS_LONG(item); # 1415|-> } else if (PyNumber_Check(item)) { # 1416| coord = PyFloat_AsDouble(item); # 1417| } else { Error: GCC_ANALYZER_WARNING (CWE-401): [#def17] Pillow-11.3.0/src/_imagingft.c:1416:21: warning[-Wanalyzer-malloc-leak]: leak of ‘coords’ Pillow-11.3.0/src/_imagingft.c:1390:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imagingft.c:1394:10: branch_false: ...to here Pillow-11.3.0/src/_imagingft.c:1394:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imagingft.c:1399:18: branch_false: ...to here Pillow-11.3.0/src/_imagingft.c:1400:26: acquire_memory: allocated here Pillow-11.3.0/src/_imagingft.c:1401:8: branch_false: following ‘false’ branch (when ‘coords’ is non-NULL)... Pillow-11.3.0/src/_imagingft.c:1401:8: branch_false: ...to here Pillow-11.3.0/src/_imagingft.c:1404:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/_imagingft.c:1405:16: branch_true: ...to here Pillow-11.3.0/src/_imagingft.c:1406:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imagingft.c:1411:13: branch_false: ...to here Pillow-11.3.0/src/_imagingft.c:1413:19: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imagingft.c:1415:20: branch_false: ...to here Pillow-11.3.0/src/_imagingft.c:1415:19: branch_true: following ‘true’ branch... Pillow-11.3.0/src/_imagingft.c:1416:21: branch_true: ...to here Pillow-11.3.0/src/_imagingft.c:1416:21: throw: if ‘PyFloat_AsDouble’ throws an exception... Pillow-11.3.0/src/_imagingft.c:1416:21: danger: ‘coords’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4) # 1414| coord = (float)PyLong_AS_LONG(item); # 1415| } else if (PyNumber_Check(item)) { # 1416|-> coord = PyFloat_AsDouble(item); # 1417| } else { # 1418| Py_DECREF(item); Error: GCC_ANALYZER_WARNING (CWE-401): [#def18] Pillow-11.3.0/src/_imagingft.c:1427:13: warning[-Wanalyzer-malloc-leak]: leak of ‘coords’ Pillow-11.3.0/src/_imagingft.c:1390:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imagingft.c:1394:10: branch_false: ...to here Pillow-11.3.0/src/_imagingft.c:1394:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/_imagingft.c:1399:18: branch_false: ...to here Pillow-11.3.0/src/_imagingft.c:1400:26: acquire_memory: allocated here Pillow-11.3.0/src/_imagingft.c:1401:8: branch_false: following ‘false’ branch (when ‘coords’ is non-NULL)... Pillow-11.3.0/src/_imagingft.c:1401:8: branch_false: ...to here Pillow-11.3.0/src/_imagingft.c:1427:13: throw: if ‘FT_Set_Var_Design_Coordinates’ throws an exception... Pillow-11.3.0/src/_imagingft.c:1427:13: danger: ‘coords’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4) # 1425| } # 1426| # 1427|-> error = FT_Set_Var_Design_Coordinates(self->face, num_coords, coords); # 1428| free(coords); # 1429| if (error) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def19] Pillow-11.3.0/src/encode.c:59:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dictionary’ Pillow-11.3.0/src/encode.c:557:1: enter_function: entry to ‘PyImaging_ZipEncoderNew’ Pillow-11.3.0/src/encode.c:567:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:582:9: branch_false: ...to here Pillow-11.3.0/src/encode.c:582:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:584:19: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:585:12: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/encode.c:588:9: branch_false: ...to here Pillow-11.3.0/src/encode.c:594:15: call_function: calling ‘PyImaging_EncoderNew’ from ‘PyImaging_ZipEncoderNew’ # 57| void *context; # 58| # 59|-> if (PyType_Ready(&ImagingEncoderType) < 0) { # 60| return NULL; # 61| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def20] Pillow-11.3.0/src/encode.c:195:5: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ Pillow-11.3.0/src/encode.c:184:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:190:20: branch_false: ...to here Pillow-11.3.0/src/encode.c:190:20: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:191:8: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)... Pillow-11.3.0/src/encode.c:195:5: branch_false: ...to here Pillow-11.3.0/src/encode.c:195:5: throw: if ‘ImagingSectionEnter’ throws an exception... Pillow-11.3.0/src/encode.c:195:5: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2) # 193| } # 194| # 195|-> ImagingSectionEnter(&cookie); # 196| # 197| do { Error: GCC_ANALYZER_WARNING (CWE-401): [#def21] Pillow-11.3.0/src/encode.c:201:18: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ Pillow-11.3.0/src/encode.c:184:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:190:20: branch_false: ...to here Pillow-11.3.0/src/encode.c:190:20: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:191:8: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)... Pillow-11.3.0/src/encode.c:195:5: branch_false: ...to here Pillow-11.3.0/src/encode.c:201:18: throw: if the called function throws an exception... Pillow-11.3.0/src/encode.c:201:18: danger: ‘buf’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2) # 199| function. */ # 200| # 201|-> status = encoder->encode(encoder->im, &encoder->state, buf, bufsize); # 202| # 203| if (status > 0) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def22] Pillow-11.3.0/src/encode.c:840:41: warning[-Wanalyzer-malloc-leak]: leak of ‘av’ Pillow-11.3.0/src/encode.c:634:1: enter_function: entry to ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:657:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:663:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:663:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:667:21: branch_false: ...to here Pillow-11.3.0/src/encode.c:671:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:675:18: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:675:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:684:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:691:15: branch_false: ...to here Pillow-11.3.0/src/encode.c:691:15: call_function: calling ‘PyImaging_EncoderNew’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:691:15: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘PyImaging_EncoderNew’ Pillow-11.3.0/src/encode.c:692:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:696:9: branch_false: ...to here Pillow-11.3.0/src/encode.c:696:9: call_function: calling ‘get_packer’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:696:9: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘get_packer’ Pillow-11.3.0/src/encode.c:696:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:700:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:700:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:706:5: branch_false: ...to here Pillow-11.3.0/src/encode.c:709:19: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:710:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:711:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:716:15: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:716:15: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:716:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:718:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:718:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:726:21: branch_true: following ‘true’ branch (when ‘i != 36’)... Pillow-11.3.0/src/encode.c:727:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:733:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:735:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:735:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:738:17: branch_false: ...to here Pillow-11.3.0/src/encode.c:738:16: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:739:32: branch_true: ...to here Pillow-11.3.0/src/encode.c:740:20: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:986:1: branch_true: ...to here Pillow-11.3.0/src/encode.c:764:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:768:16: branch_false: ...to here Pillow-11.3.0/src/encode.c:768:16: branch_false: following ‘false’ branch (when ‘type != 0’)... Pillow-11.3.0/src/encode.c:779:12: branch_false: ...to here Pillow-11.3.0/src/encode.c:779:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:781:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:784:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:791:13: branch_false: ...to here Pillow-11.3.0/src/encode.c:791:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:798:19: branch_false: ...to here Pillow-11.3.0/src/encode.c:798:19: branch_true: following ‘true’ branch (when ‘is_var_length != 0’)... Pillow-11.3.0/src/encode.c:801:19: branch_true: ...to here Pillow-11.3.0/src/encode.c:803:16: branch_false: following ‘false’ branch (when ‘key_int != 320’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:827:23: branch_false: following ‘false’ branch (when ‘key_int != 530’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:837:22: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:838:20: branch_true: following ‘true’ branch (when ‘av’ is non-NULL)... Pillow-11.3.0/src/encode.c:838:20: branch_true: ...to here Pillow-11.3.0/src/encode.c:839:33: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:840:41: branch_true: ...to here Pillow-11.3.0/src/encode.c:840:41: throw: if ‘PyTuple_GetItem’ throws an exception... Pillow-11.3.0/src/encode.c:840:41: danger: ‘av’ leaks here; was allocated at [(78)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/77) # 838| if (av) { # 839| for (i = 0; i < len; i++) { # 840|-> av[i] = (UINT16)PyLong_AsLong(PyTuple_GetItem(value, i)); # 841| } # 842| status = ImagingLibTiffSetField( Error: GCC_ANALYZER_WARNING (CWE-401): [#def23] Pillow-11.3.0/src/encode.c:842:30: warning[-Wanalyzer-malloc-leak]: leak of ‘av’ Pillow-11.3.0/src/encode.c:634:1: enter_function: entry to ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:657:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:663:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:663:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:667:21: branch_false: ...to here Pillow-11.3.0/src/encode.c:671:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:675:18: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:675:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:684:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:691:15: branch_false: ...to here Pillow-11.3.0/src/encode.c:691:15: call_function: calling ‘PyImaging_EncoderNew’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:691:15: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘PyImaging_EncoderNew’ Pillow-11.3.0/src/encode.c:692:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:696:9: branch_false: ...to here Pillow-11.3.0/src/encode.c:696:9: call_function: calling ‘get_packer’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:696:9: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘get_packer’ Pillow-11.3.0/src/encode.c:696:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:700:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:700:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:706:5: branch_false: ...to here Pillow-11.3.0/src/encode.c:709:19: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:710:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:711:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:716:15: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:716:15: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:716:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:718:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:718:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:726:21: branch_true: following ‘true’ branch (when ‘i != 36’)... Pillow-11.3.0/src/encode.c:727:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:733:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:735:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:735:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:738:17: branch_false: ...to here Pillow-11.3.0/src/encode.c:738:16: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:739:32: branch_true: ...to here Pillow-11.3.0/src/encode.c:740:20: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:986:1: branch_true: ...to here Pillow-11.3.0/src/encode.c:764:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:768:16: branch_false: ...to here Pillow-11.3.0/src/encode.c:768:16: branch_false: following ‘false’ branch (when ‘type != 0’)... Pillow-11.3.0/src/encode.c:779:12: branch_false: ...to here Pillow-11.3.0/src/encode.c:779:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:781:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:784:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:791:13: branch_false: ...to here Pillow-11.3.0/src/encode.c:791:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:798:19: branch_false: ...to here Pillow-11.3.0/src/encode.c:798:19: branch_true: following ‘true’ branch (when ‘is_var_length != 0’)... Pillow-11.3.0/src/encode.c:801:19: branch_true: ...to here Pillow-11.3.0/src/encode.c:803:16: branch_false: following ‘false’ branch (when ‘key_int != 320’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:827:23: branch_false: following ‘false’ branch (when ‘key_int != 530’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:837:22: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:838:20: branch_true: following ‘true’ branch (when ‘av’ is non-NULL)... Pillow-11.3.0/src/encode.c:838:20: branch_true: ...to here Pillow-11.3.0/src/encode.c:839:33: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:842:30: branch_false: ...to here Pillow-11.3.0/src/encode.c:842:30: throw: if ‘ImagingLibTiffSetField’ throws an exception... Pillow-11.3.0/src/encode.c:842:30: danger: ‘av’ leaks here; was allocated at [(78)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/77) # 840| av[i] = (UINT16)PyLong_AsLong(PyTuple_GetItem(value, i)); # 841| } # 842|-> status = ImagingLibTiffSetField( # 843| &encoder->state, (ttag_t)key_int, len, av # 844| ); Error: GCC_ANALYZER_WARNING (CWE-401): [#def24] Pillow-11.3.0/src/encode.c:853:41: warning[-Wanalyzer-malloc-leak]: leak of ‘av’ Pillow-11.3.0/src/encode.c:634:1: enter_function: entry to ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:657:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:663:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:663:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:667:21: branch_false: ...to here Pillow-11.3.0/src/encode.c:671:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:675:18: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:675:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:684:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:691:15: branch_false: ...to here Pillow-11.3.0/src/encode.c:691:15: call_function: calling ‘PyImaging_EncoderNew’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:691:15: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘PyImaging_EncoderNew’ Pillow-11.3.0/src/encode.c:692:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:696:9: branch_false: ...to here Pillow-11.3.0/src/encode.c:696:9: call_function: calling ‘get_packer’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:696:9: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘get_packer’ Pillow-11.3.0/src/encode.c:696:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:700:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:700:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:706:5: branch_false: ...to here Pillow-11.3.0/src/encode.c:709:19: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:710:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:711:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:716:15: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:716:15: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:716:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:718:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:718:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:726:21: branch_true: following ‘true’ branch (when ‘i != 36’)... Pillow-11.3.0/src/encode.c:727:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:733:12: branch_false: following ‘false’ branch (when ‘is_core_tag != 0’)... Pillow-11.3.0/src/encode.c:749:17: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:749:16: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:758:13: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:758:12: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:760:19: branch_true: ...to here Pillow-11.3.0/src/encode.c:764:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:768:16: branch_false: ...to here Pillow-11.3.0/src/encode.c:768:16: branch_false: following ‘false’ branch (when ‘type != 0’)... Pillow-11.3.0/src/encode.c:779:12: branch_false: ...to here Pillow-11.3.0/src/encode.c:779:12: branch_false: following ‘false’ branch (when ‘is_core_tag != 0’)... Pillow-11.3.0/src/encode.c:791:13: branch_false: ...to here Pillow-11.3.0/src/encode.c:791:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:798:19: branch_false: ...to here Pillow-11.3.0/src/encode.c:798:19: branch_true: following ‘true’ branch (when ‘is_var_length != 0’)... Pillow-11.3.0/src/encode.c:801:19: branch_true: ...to here Pillow-11.3.0/src/encode.c:803:16: branch_false: following ‘false’ branch (when ‘key_int != 320’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:827:23: branch_false: following ‘false’ branch (when ‘key_int != 530’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:850:22: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:851:20: branch_true: following ‘true’ branch (when ‘av’ is non-NULL)... Pillow-11.3.0/src/encode.c:851:20: branch_true: ...to here Pillow-11.3.0/src/encode.c:852:33: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:853:41: branch_true: ...to here Pillow-11.3.0/src/encode.c:853:41: throw: if ‘PyTuple_GetItem’ throws an exception... Pillow-11.3.0/src/encode.c:853:41: danger: ‘av’ leaks here; was allocated at [(72)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/71) # 851| if (av) { # 852| for (i = 0; i < len; i++) { # 853|-> av[i] = (UINT32)PyLong_AsLong(PyTuple_GetItem(value, i)); # 854| } # 855| status = ImagingLibTiffSetField( Error: GCC_ANALYZER_WARNING (CWE-401): [#def25] Pillow-11.3.0/src/encode.c:855:30: warning[-Wanalyzer-malloc-leak]: leak of ‘av’ Pillow-11.3.0/src/encode.c:634:1: enter_function: entry to ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:657:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:663:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:663:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:667:21: branch_false: ...to here Pillow-11.3.0/src/encode.c:671:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:675:18: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:675:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:684:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:691:15: branch_false: ...to here Pillow-11.3.0/src/encode.c:691:15: call_function: calling ‘PyImaging_EncoderNew’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:691:15: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘PyImaging_EncoderNew’ Pillow-11.3.0/src/encode.c:692:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:696:9: branch_false: ...to here Pillow-11.3.0/src/encode.c:696:9: call_function: calling ‘get_packer’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:696:9: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘get_packer’ Pillow-11.3.0/src/encode.c:696:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:700:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:700:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:706:5: branch_false: ...to here Pillow-11.3.0/src/encode.c:709:19: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:710:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:711:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:716:15: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:716:15: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:716:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:718:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:718:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:726:21: branch_true: following ‘true’ branch (when ‘i != 36’)... Pillow-11.3.0/src/encode.c:727:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:733:12: branch_false: following ‘false’ branch (when ‘is_core_tag != 0’)... Pillow-11.3.0/src/encode.c:749:17: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:749:16: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:758:13: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:758:12: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:760:19: branch_true: ...to here Pillow-11.3.0/src/encode.c:764:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:768:16: branch_false: ...to here Pillow-11.3.0/src/encode.c:768:16: branch_false: following ‘false’ branch (when ‘type != 0’)... Pillow-11.3.0/src/encode.c:779:12: branch_false: ...to here Pillow-11.3.0/src/encode.c:779:12: branch_false: following ‘false’ branch (when ‘is_core_tag != 0’)... Pillow-11.3.0/src/encode.c:791:13: branch_false: ...to here Pillow-11.3.0/src/encode.c:791:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:798:19: branch_false: ...to here Pillow-11.3.0/src/encode.c:798:19: branch_true: following ‘true’ branch (when ‘is_var_length != 0’)... Pillow-11.3.0/src/encode.c:801:19: branch_true: ...to here Pillow-11.3.0/src/encode.c:803:16: branch_false: following ‘false’ branch (when ‘key_int != 320’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:827:23: branch_false: following ‘false’ branch (when ‘key_int != 530’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:850:22: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:851:20: branch_true: following ‘true’ branch (when ‘av’ is non-NULL)... Pillow-11.3.0/src/encode.c:851:20: branch_true: ...to here Pillow-11.3.0/src/encode.c:852:33: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:855:30: branch_false: ...to here Pillow-11.3.0/src/encode.c:855:30: throw: if ‘ImagingLibTiffSetField’ throws an exception... Pillow-11.3.0/src/encode.c:855:30: danger: ‘av’ leaks here; was allocated at [(72)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/71) # 853| av[i] = (UINT32)PyLong_AsLong(PyTuple_GetItem(value, i)); # 854| } # 855|-> status = ImagingLibTiffSetField( # 856| &encoder->state, (ttag_t)key_int, len, av # 857| ); Error: GCC_ANALYZER_WARNING (CWE-401): [#def26] Pillow-11.3.0/src/encode.c:866:39: warning[-Wanalyzer-malloc-leak]: leak of ‘av’ Pillow-11.3.0/src/encode.c:634:1: enter_function: entry to ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:657:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:663:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:663:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:667:21: branch_false: ...to here Pillow-11.3.0/src/encode.c:671:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:675:18: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:675:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:684:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:691:15: branch_false: ...to here Pillow-11.3.0/src/encode.c:691:15: call_function: calling ‘PyImaging_EncoderNew’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:691:15: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘PyImaging_EncoderNew’ Pillow-11.3.0/src/encode.c:692:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:696:9: branch_false: ...to here Pillow-11.3.0/src/encode.c:696:9: call_function: calling ‘get_packer’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:696:9: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘get_packer’ Pillow-11.3.0/src/encode.c:696:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:700:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:700:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:706:5: branch_false: ...to here Pillow-11.3.0/src/encode.c:709:19: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:710:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:711:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:716:15: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:716:15: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:716:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:718:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:718:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:726:21: branch_true: following ‘true’ branch (when ‘i != 36’)... Pillow-11.3.0/src/encode.c:727:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:733:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:735:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:735:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:738:17: branch_false: ...to here Pillow-11.3.0/src/encode.c:738:16: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:739:32: branch_true: ...to here Pillow-11.3.0/src/encode.c:740:20: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:986:1: branch_true: ...to here Pillow-11.3.0/src/encode.c:764:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:768:16: branch_false: ...to here Pillow-11.3.0/src/encode.c:768:16: branch_false: following ‘false’ branch (when ‘type != 0’)... Pillow-11.3.0/src/encode.c:779:12: branch_false: ...to here Pillow-11.3.0/src/encode.c:779:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:781:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:784:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:791:13: branch_false: ...to here Pillow-11.3.0/src/encode.c:791:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:798:19: branch_false: ...to here Pillow-11.3.0/src/encode.c:798:19: branch_true: following ‘true’ branch (when ‘is_var_length != 0’)... Pillow-11.3.0/src/encode.c:801:19: branch_true: ...to here Pillow-11.3.0/src/encode.c:803:16: branch_false: following ‘false’ branch (when ‘key_int != 320’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:827:23: branch_false: following ‘false’ branch (when ‘key_int != 530’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:863:22: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:864:20: branch_true: following ‘true’ branch (when ‘av’ is non-NULL)... Pillow-11.3.0/src/encode.c:864:20: branch_true: ...to here Pillow-11.3.0/src/encode.c:865:33: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:866:39: branch_true: ...to here Pillow-11.3.0/src/encode.c:866:39: throw: if ‘PyTuple_GetItem’ throws an exception... Pillow-11.3.0/src/encode.c:866:39: danger: ‘av’ leaks here; was allocated at [(78)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/77) # 864| if (av) { # 865| for (i = 0; i < len; i++) { # 866|-> av[i] = (INT8)PyLong_AsLong(PyTuple_GetItem(value, i)); # 867| } # 868| status = ImagingLibTiffSetField( Error: GCC_ANALYZER_WARNING (CWE-401): [#def27] Pillow-11.3.0/src/encode.c:868:30: warning[-Wanalyzer-malloc-leak]: leak of ‘av’ Pillow-11.3.0/src/encode.c:634:1: enter_function: entry to ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:657:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:663:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:663:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:667:21: branch_false: ...to here Pillow-11.3.0/src/encode.c:671:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:675:18: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:675:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:684:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:691:15: branch_false: ...to here Pillow-11.3.0/src/encode.c:691:15: call_function: calling ‘PyImaging_EncoderNew’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:691:15: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘PyImaging_EncoderNew’ Pillow-11.3.0/src/encode.c:692:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:696:9: branch_false: ...to here Pillow-11.3.0/src/encode.c:696:9: call_function: calling ‘get_packer’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:696:9: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘get_packer’ Pillow-11.3.0/src/encode.c:696:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:700:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:700:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:706:5: branch_false: ...to here Pillow-11.3.0/src/encode.c:709:19: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:710:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:711:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:716:15: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:716:15: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:716:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:718:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:718:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:726:21: branch_true: following ‘true’ branch (when ‘i != 36’)... Pillow-11.3.0/src/encode.c:727:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:733:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:735:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:735:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:738:17: branch_false: ...to here Pillow-11.3.0/src/encode.c:738:16: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:739:32: branch_true: ...to here Pillow-11.3.0/src/encode.c:740:20: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:986:1: branch_true: ...to here Pillow-11.3.0/src/encode.c:764:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:768:16: branch_false: ...to here Pillow-11.3.0/src/encode.c:768:16: branch_false: following ‘false’ branch (when ‘type != 0’)... Pillow-11.3.0/src/encode.c:779:12: branch_false: ...to here Pillow-11.3.0/src/encode.c:779:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:781:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:784:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:791:13: branch_false: ...to here Pillow-11.3.0/src/encode.c:791:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:798:19: branch_false: ...to here Pillow-11.3.0/src/encode.c:798:19: branch_true: following ‘true’ branch (when ‘is_var_length != 0’)... Pillow-11.3.0/src/encode.c:801:19: branch_true: ...to here Pillow-11.3.0/src/encode.c:803:16: branch_false: following ‘false’ branch (when ‘key_int != 320’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:827:23: branch_false: following ‘false’ branch (when ‘key_int != 530’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:863:22: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:864:20: branch_true: following ‘true’ branch (when ‘av’ is non-NULL)... Pillow-11.3.0/src/encode.c:864:20: branch_true: ...to here Pillow-11.3.0/src/encode.c:865:33: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:868:30: branch_false: ...to here Pillow-11.3.0/src/encode.c:868:30: throw: if ‘ImagingLibTiffSetField’ throws an exception... Pillow-11.3.0/src/encode.c:868:30: danger: ‘av’ leaks here; was allocated at [(78)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/77) # 866| av[i] = (INT8)PyLong_AsLong(PyTuple_GetItem(value, i)); # 867| } # 868|-> status = ImagingLibTiffSetField( # 869| &encoder->state, (ttag_t)key_int, len, av # 870| ); Error: GCC_ANALYZER_WARNING (CWE-401): [#def28] Pillow-11.3.0/src/encode.c:879:40: warning[-Wanalyzer-malloc-leak]: leak of ‘av’ Pillow-11.3.0/src/encode.c:634:1: enter_function: entry to ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:657:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:663:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:663:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:667:21: branch_false: ...to here Pillow-11.3.0/src/encode.c:671:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:675:18: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:675:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:684:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:691:15: branch_false: ...to here Pillow-11.3.0/src/encode.c:691:15: call_function: calling ‘PyImaging_EncoderNew’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:691:15: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘PyImaging_EncoderNew’ Pillow-11.3.0/src/encode.c:692:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:696:9: branch_false: ...to here Pillow-11.3.0/src/encode.c:696:9: call_function: calling ‘get_packer’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:696:9: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘get_packer’ Pillow-11.3.0/src/encode.c:696:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:700:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:700:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:706:5: branch_false: ...to here Pillow-11.3.0/src/encode.c:709:19: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:710:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:711:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:716:15: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:716:15: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:716:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:718:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:718:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:726:21: branch_true: following ‘true’ branch (when ‘i != 36’)... Pillow-11.3.0/src/encode.c:727:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:733:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:735:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:735:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:738:17: branch_false: ...to here Pillow-11.3.0/src/encode.c:738:16: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:739:32: branch_true: ...to here Pillow-11.3.0/src/encode.c:740:20: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:986:1: branch_true: ...to here Pillow-11.3.0/src/encode.c:764:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:768:16: branch_false: ...to here Pillow-11.3.0/src/encode.c:768:16: branch_false: following ‘false’ branch (when ‘type != 0’)... Pillow-11.3.0/src/encode.c:779:12: branch_false: ...to here Pillow-11.3.0/src/encode.c:779:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:781:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:784:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:791:13: branch_false: ...to here Pillow-11.3.0/src/encode.c:791:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:798:19: branch_false: ...to here Pillow-11.3.0/src/encode.c:798:19: branch_true: following ‘true’ branch (when ‘is_var_length != 0’)... Pillow-11.3.0/src/encode.c:801:19: branch_true: ...to here Pillow-11.3.0/src/encode.c:803:16: branch_false: following ‘false’ branch (when ‘key_int != 320’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:827:23: branch_false: following ‘false’ branch (when ‘key_int != 530’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:876:22: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:877:20: branch_true: following ‘true’ branch (when ‘av’ is non-NULL)... Pillow-11.3.0/src/encode.c:877:20: branch_true: ...to here Pillow-11.3.0/src/encode.c:878:33: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:879:40: branch_true: ...to here Pillow-11.3.0/src/encode.c:879:40: throw: if ‘PyTuple_GetItem’ throws an exception... Pillow-11.3.0/src/encode.c:879:40: danger: ‘av’ leaks here; was allocated at [(78)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/77) # 877| if (av) { # 878| for (i = 0; i < len; i++) { # 879|-> av[i] = (INT16)PyLong_AsLong(PyTuple_GetItem(value, i)); # 880| } # 881| status = ImagingLibTiffSetField( Error: GCC_ANALYZER_WARNING (CWE-401): [#def29] Pillow-11.3.0/src/encode.c:881:30: warning[-Wanalyzer-malloc-leak]: leak of ‘av’ Pillow-11.3.0/src/encode.c:634:1: enter_function: entry to ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:657:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:663:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:663:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:667:21: branch_false: ...to here Pillow-11.3.0/src/encode.c:671:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:675:18: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:675:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:684:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:691:15: branch_false: ...to here Pillow-11.3.0/src/encode.c:691:15: call_function: calling ‘PyImaging_EncoderNew’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:691:15: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘PyImaging_EncoderNew’ Pillow-11.3.0/src/encode.c:692:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:696:9: branch_false: ...to here Pillow-11.3.0/src/encode.c:696:9: call_function: calling ‘get_packer’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:696:9: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘get_packer’ Pillow-11.3.0/src/encode.c:696:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:700:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:700:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:706:5: branch_false: ...to here Pillow-11.3.0/src/encode.c:709:19: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:710:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:711:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:716:15: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:716:15: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:716:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:718:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:718:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:726:21: branch_true: following ‘true’ branch (when ‘i != 36’)... Pillow-11.3.0/src/encode.c:727:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:733:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:735:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:735:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:738:17: branch_false: ...to here Pillow-11.3.0/src/encode.c:738:16: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:739:32: branch_true: ...to here Pillow-11.3.0/src/encode.c:740:20: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:986:1: branch_true: ...to here Pillow-11.3.0/src/encode.c:764:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:768:16: branch_false: ...to here Pillow-11.3.0/src/encode.c:768:16: branch_false: following ‘false’ branch (when ‘type != 0’)... Pillow-11.3.0/src/encode.c:779:12: branch_false: ...to here Pillow-11.3.0/src/encode.c:779:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:781:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:784:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:791:13: branch_false: ...to here Pillow-11.3.0/src/encode.c:791:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:798:19: branch_false: ...to here Pillow-11.3.0/src/encode.c:798:19: branch_true: following ‘true’ branch (when ‘is_var_length != 0’)... Pillow-11.3.0/src/encode.c:801:19: branch_true: ...to here Pillow-11.3.0/src/encode.c:803:16: branch_false: following ‘false’ branch (when ‘key_int != 320’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:827:23: branch_false: following ‘false’ branch (when ‘key_int != 530’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:876:22: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:877:20: branch_true: following ‘true’ branch (when ‘av’ is non-NULL)... Pillow-11.3.0/src/encode.c:877:20: branch_true: ...to here Pillow-11.3.0/src/encode.c:878:33: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:881:30: branch_false: ...to here Pillow-11.3.0/src/encode.c:881:30: throw: if ‘ImagingLibTiffSetField’ throws an exception... Pillow-11.3.0/src/encode.c:881:30: danger: ‘av’ leaks here; was allocated at [(78)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/77) # 879| av[i] = (INT16)PyLong_AsLong(PyTuple_GetItem(value, i)); # 880| } # 881|-> status = ImagingLibTiffSetField( # 882| &encoder->state, (ttag_t)key_int, len, av # 883| ); Error: GCC_ANALYZER_WARNING (CWE-401): [#def30] Pillow-11.3.0/src/encode.c:892:40: warning[-Wanalyzer-malloc-leak]: leak of ‘av’ Pillow-11.3.0/src/encode.c:634:1: enter_function: entry to ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:657:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:663:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:663:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:667:21: branch_false: ...to here Pillow-11.3.0/src/encode.c:671:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:675:18: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:675:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:684:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:691:15: branch_false: ...to here Pillow-11.3.0/src/encode.c:691:15: call_function: calling ‘PyImaging_EncoderNew’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:691:15: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘PyImaging_EncoderNew’ Pillow-11.3.0/src/encode.c:692:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:696:9: branch_false: ...to here Pillow-11.3.0/src/encode.c:696:9: call_function: calling ‘get_packer’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:696:9: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘get_packer’ Pillow-11.3.0/src/encode.c:696:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:700:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:700:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:706:5: branch_false: ...to here Pillow-11.3.0/src/encode.c:709:19: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:710:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:711:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:716:15: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:716:15: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:716:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:718:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:718:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:726:21: branch_true: following ‘true’ branch (when ‘i != 36’)... Pillow-11.3.0/src/encode.c:727:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:733:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:735:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:735:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:738:17: branch_false: ...to here Pillow-11.3.0/src/encode.c:738:16: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:739:32: branch_true: ...to here Pillow-11.3.0/src/encode.c:740:20: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:986:1: branch_true: ...to here Pillow-11.3.0/src/encode.c:764:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:768:16: branch_false: ...to here Pillow-11.3.0/src/encode.c:768:16: branch_false: following ‘false’ branch (when ‘type != 0’)... Pillow-11.3.0/src/encode.c:779:12: branch_false: ...to here Pillow-11.3.0/src/encode.c:779:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:781:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:784:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:791:13: branch_false: ...to here Pillow-11.3.0/src/encode.c:791:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:798:19: branch_false: ...to here Pillow-11.3.0/src/encode.c:798:19: branch_true: following ‘true’ branch (when ‘is_var_length != 0’)... Pillow-11.3.0/src/encode.c:801:19: branch_true: ...to here Pillow-11.3.0/src/encode.c:803:16: branch_false: following ‘false’ branch (when ‘key_int != 320’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:827:23: branch_false: following ‘false’ branch (when ‘key_int != 530’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:889:22: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:890:20: branch_true: following ‘true’ branch (when ‘av’ is non-NULL)... Pillow-11.3.0/src/encode.c:890:20: branch_true: ...to here Pillow-11.3.0/src/encode.c:891:33: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:892:40: branch_true: ...to here Pillow-11.3.0/src/encode.c:892:40: throw: if ‘PyTuple_GetItem’ throws an exception... Pillow-11.3.0/src/encode.c:892:40: danger: ‘av’ leaks here; was allocated at [(78)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/77) # 890| if (av) { # 891| for (i = 0; i < len; i++) { # 892|-> av[i] = (INT32)PyLong_AsLong(PyTuple_GetItem(value, i)); # 893| } # 894| status = ImagingLibTiffSetField( Error: GCC_ANALYZER_WARNING (CWE-401): [#def31] Pillow-11.3.0/src/encode.c:894:30: warning[-Wanalyzer-malloc-leak]: leak of ‘av’ Pillow-11.3.0/src/encode.c:634:1: enter_function: entry to ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:657:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:663:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:663:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:667:21: branch_false: ...to here Pillow-11.3.0/src/encode.c:671:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:675:18: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:675:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:684:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:691:15: branch_false: ...to here Pillow-11.3.0/src/encode.c:691:15: call_function: calling ‘PyImaging_EncoderNew’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:691:15: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘PyImaging_EncoderNew’ Pillow-11.3.0/src/encode.c:692:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:696:9: branch_false: ...to here Pillow-11.3.0/src/encode.c:696:9: call_function: calling ‘get_packer’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:696:9: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘get_packer’ Pillow-11.3.0/src/encode.c:696:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:700:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:700:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:706:5: branch_false: ...to here Pillow-11.3.0/src/encode.c:709:19: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:710:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:711:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:716:15: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:716:15: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:716:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:718:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:718:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:726:21: branch_true: following ‘true’ branch (when ‘i != 36’)... Pillow-11.3.0/src/encode.c:727:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:733:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:735:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:735:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:738:17: branch_false: ...to here Pillow-11.3.0/src/encode.c:738:16: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:739:32: branch_true: ...to here Pillow-11.3.0/src/encode.c:740:20: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:986:1: branch_true: ...to here Pillow-11.3.0/src/encode.c:764:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:768:16: branch_false: ...to here Pillow-11.3.0/src/encode.c:768:16: branch_false: following ‘false’ branch (when ‘type != 0’)... Pillow-11.3.0/src/encode.c:779:12: branch_false: ...to here Pillow-11.3.0/src/encode.c:779:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:781:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:784:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:791:13: branch_false: ...to here Pillow-11.3.0/src/encode.c:791:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:798:19: branch_false: ...to here Pillow-11.3.0/src/encode.c:798:19: branch_true: following ‘true’ branch (when ‘is_var_length != 0’)... Pillow-11.3.0/src/encode.c:801:19: branch_true: ...to here Pillow-11.3.0/src/encode.c:803:16: branch_false: following ‘false’ branch (when ‘key_int != 320’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:827:23: branch_false: following ‘false’ branch (when ‘key_int != 530’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:889:22: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:890:20: branch_true: following ‘true’ branch (when ‘av’ is non-NULL)... Pillow-11.3.0/src/encode.c:890:20: branch_true: ...to here Pillow-11.3.0/src/encode.c:891:33: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:894:30: branch_false: ...to here Pillow-11.3.0/src/encode.c:894:30: throw: if ‘ImagingLibTiffSetField’ throws an exception... Pillow-11.3.0/src/encode.c:894:30: danger: ‘av’ leaks here; was allocated at [(78)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/77) # 892| av[i] = (INT32)PyLong_AsLong(PyTuple_GetItem(value, i)); # 893| } # 894|-> status = ImagingLibTiffSetField( # 895| &encoder->state, (ttag_t)key_int, len, av # 896| ); Error: GCC_ANALYZER_WARNING (CWE-401): [#def32] Pillow-11.3.0/src/encode.c:905:42: warning[-Wanalyzer-malloc-leak]: leak of ‘av’ Pillow-11.3.0/src/encode.c:634:1: enter_function: entry to ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:657:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:663:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:663:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:667:21: branch_false: ...to here Pillow-11.3.0/src/encode.c:671:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:675:18: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:675:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:684:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:691:15: branch_false: ...to here Pillow-11.3.0/src/encode.c:691:15: call_function: calling ‘PyImaging_EncoderNew’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:691:15: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘PyImaging_EncoderNew’ Pillow-11.3.0/src/encode.c:692:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:696:9: branch_false: ...to here Pillow-11.3.0/src/encode.c:696:9: call_function: calling ‘get_packer’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:696:9: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘get_packer’ Pillow-11.3.0/src/encode.c:696:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:700:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:700:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:706:5: branch_false: ...to here Pillow-11.3.0/src/encode.c:709:19: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:710:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:711:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:716:15: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:716:15: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:716:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:718:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:718:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:726:21: branch_true: following ‘true’ branch (when ‘i != 36’)... Pillow-11.3.0/src/encode.c:727:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:733:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:735:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:735:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:738:17: branch_false: ...to here Pillow-11.3.0/src/encode.c:738:16: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:739:32: branch_true: ...to here Pillow-11.3.0/src/encode.c:740:20: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:986:1: branch_true: ...to here Pillow-11.3.0/src/encode.c:764:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:768:16: branch_false: ...to here Pillow-11.3.0/src/encode.c:768:16: branch_false: following ‘false’ branch (when ‘type != 0’)... Pillow-11.3.0/src/encode.c:779:12: branch_false: ...to here Pillow-11.3.0/src/encode.c:779:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:781:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:784:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:791:13: branch_false: ...to here Pillow-11.3.0/src/encode.c:791:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:798:19: branch_false: ...to here Pillow-11.3.0/src/encode.c:798:19: branch_true: following ‘true’ branch (when ‘is_var_length != 0’)... Pillow-11.3.0/src/encode.c:801:19: branch_true: ...to here Pillow-11.3.0/src/encode.c:803:16: branch_false: following ‘false’ branch (when ‘key_int != 320’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:827:23: branch_false: following ‘false’ branch (when ‘key_int != 530’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:902:22: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:903:20: branch_true: following ‘true’ branch (when ‘av’ is non-NULL)... Pillow-11.3.0/src/encode.c:903:20: branch_true: ...to here Pillow-11.3.0/src/encode.c:904:33: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:905:42: branch_true: ...to here Pillow-11.3.0/src/encode.c:905:42: throw: if ‘PyTuple_GetItem’ throws an exception... Pillow-11.3.0/src/encode.c:905:42: danger: ‘av’ leaks here; was allocated at [(78)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/77) # 903| if (av) { # 904| for (i = 0; i < len; i++) { # 905|-> av[i] = (FLOAT32)PyFloat_AsDouble(PyTuple_GetItem(value, i)); # 906| } # 907| status = ImagingLibTiffSetField( Error: GCC_ANALYZER_WARNING (CWE-401): [#def33] Pillow-11.3.0/src/encode.c:907:30: warning[-Wanalyzer-malloc-leak]: leak of ‘av’ Pillow-11.3.0/src/encode.c:634:1: enter_function: entry to ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:657:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:663:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:663:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:667:21: branch_false: ...to here Pillow-11.3.0/src/encode.c:671:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:675:18: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:675:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:684:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:691:15: branch_false: ...to here Pillow-11.3.0/src/encode.c:691:15: call_function: calling ‘PyImaging_EncoderNew’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:691:15: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘PyImaging_EncoderNew’ Pillow-11.3.0/src/encode.c:692:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:696:9: branch_false: ...to here Pillow-11.3.0/src/encode.c:696:9: call_function: calling ‘get_packer’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:696:9: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘get_packer’ Pillow-11.3.0/src/encode.c:696:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:700:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:700:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:706:5: branch_false: ...to here Pillow-11.3.0/src/encode.c:709:19: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:710:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:711:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:716:15: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:716:15: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:716:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:718:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:718:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:726:21: branch_true: following ‘true’ branch (when ‘i != 36’)... Pillow-11.3.0/src/encode.c:727:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:733:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:735:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:735:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:738:17: branch_false: ...to here Pillow-11.3.0/src/encode.c:738:16: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:739:32: branch_true: ...to here Pillow-11.3.0/src/encode.c:740:20: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:986:1: branch_true: ...to here Pillow-11.3.0/src/encode.c:764:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:768:16: branch_false: ...to here Pillow-11.3.0/src/encode.c:768:16: branch_false: following ‘false’ branch (when ‘type != 0’)... Pillow-11.3.0/src/encode.c:779:12: branch_false: ...to here Pillow-11.3.0/src/encode.c:779:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:781:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:784:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:791:13: branch_false: ...to here Pillow-11.3.0/src/encode.c:791:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:798:19: branch_false: ...to here Pillow-11.3.0/src/encode.c:798:19: branch_true: following ‘true’ branch (when ‘is_var_length != 0’)... Pillow-11.3.0/src/encode.c:801:19: branch_true: ...to here Pillow-11.3.0/src/encode.c:803:16: branch_false: following ‘false’ branch (when ‘key_int != 320’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:827:23: branch_false: following ‘false’ branch (when ‘key_int != 530’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:902:22: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:903:20: branch_true: following ‘true’ branch (when ‘av’ is non-NULL)... Pillow-11.3.0/src/encode.c:903:20: branch_true: ...to here Pillow-11.3.0/src/encode.c:904:33: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:907:30: branch_false: ...to here Pillow-11.3.0/src/encode.c:907:30: throw: if ‘ImagingLibTiffSetField’ throws an exception... Pillow-11.3.0/src/encode.c:907:30: danger: ‘av’ leaks here; was allocated at [(78)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/77) # 905| av[i] = (FLOAT32)PyFloat_AsDouble(PyTuple_GetItem(value, i)); # 906| } # 907|-> status = ImagingLibTiffSetField( # 908| &encoder->state, (ttag_t)key_int, len, av # 909| ); Error: GCC_ANALYZER_WARNING (CWE-401): [#def34] Pillow-11.3.0/src/encode.c:918:33: warning[-Wanalyzer-malloc-leak]: leak of ‘av’ Pillow-11.3.0/src/encode.c:634:1: enter_function: entry to ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:657:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:663:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:663:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:667:21: branch_false: ...to here Pillow-11.3.0/src/encode.c:671:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:675:18: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:675:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:684:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:691:15: branch_false: ...to here Pillow-11.3.0/src/encode.c:691:15: call_function: calling ‘PyImaging_EncoderNew’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:691:15: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘PyImaging_EncoderNew’ Pillow-11.3.0/src/encode.c:692:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:696:9: branch_false: ...to here Pillow-11.3.0/src/encode.c:696:9: call_function: calling ‘get_packer’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:696:9: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘get_packer’ Pillow-11.3.0/src/encode.c:696:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:700:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:700:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:706:5: branch_false: ...to here Pillow-11.3.0/src/encode.c:709:19: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:710:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:711:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:716:15: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:716:15: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:716:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:718:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:718:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:726:21: branch_true: following ‘true’ branch (when ‘i != 36’)... Pillow-11.3.0/src/encode.c:727:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:733:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:735:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:735:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:738:17: branch_false: ...to here Pillow-11.3.0/src/encode.c:738:16: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:739:32: branch_true: ...to here Pillow-11.3.0/src/encode.c:740:20: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:986:1: branch_true: ...to here Pillow-11.3.0/src/encode.c:764:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:768:16: branch_false: ...to here Pillow-11.3.0/src/encode.c:768:16: branch_false: following ‘false’ branch (when ‘type != 0’)... Pillow-11.3.0/src/encode.c:779:12: branch_false: ...to here Pillow-11.3.0/src/encode.c:779:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:781:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:784:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:791:13: branch_false: ...to here Pillow-11.3.0/src/encode.c:791:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:798:19: branch_false: ...to here Pillow-11.3.0/src/encode.c:798:19: branch_true: following ‘true’ branch (when ‘is_var_length != 0’)... Pillow-11.3.0/src/encode.c:801:19: branch_true: ...to here Pillow-11.3.0/src/encode.c:803:16: branch_false: following ‘false’ branch (when ‘key_int != 320’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:827:23: branch_false: following ‘false’ branch (when ‘key_int != 530’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:915:22: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:916:20: branch_true: following ‘true’ branch (when ‘av’ is non-NULL)... Pillow-11.3.0/src/encode.c:916:20: branch_true: ...to here Pillow-11.3.0/src/encode.c:917:33: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:918:33: branch_true: ...to here Pillow-11.3.0/src/encode.c:918:33: throw: if ‘PyTuple_GetItem’ throws an exception... Pillow-11.3.0/src/encode.c:918:33: danger: ‘av’ leaks here; was allocated at [(78)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/77) # 916| if (av) { # 917| for (i = 0; i < len; i++) { # 918|-> av[i] = PyFloat_AsDouble(PyTuple_GetItem(value, i)); # 919| } # 920| status = ImagingLibTiffSetField( Error: GCC_ANALYZER_WARNING (CWE-401): [#def35] Pillow-11.3.0/src/encode.c:920:30: warning[-Wanalyzer-malloc-leak]: leak of ‘av’ Pillow-11.3.0/src/encode.c:634:1: enter_function: entry to ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:657:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:663:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:663:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:667:21: branch_false: ...to here Pillow-11.3.0/src/encode.c:671:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:675:18: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:675:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:684:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:691:15: branch_false: ...to here Pillow-11.3.0/src/encode.c:691:15: call_function: calling ‘PyImaging_EncoderNew’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:691:15: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘PyImaging_EncoderNew’ Pillow-11.3.0/src/encode.c:692:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:696:9: branch_false: ...to here Pillow-11.3.0/src/encode.c:696:9: call_function: calling ‘get_packer’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:696:9: return_function: returning to ‘PyImaging_LibTiffEncoderNew’ from ‘get_packer’ Pillow-11.3.0/src/encode.c:696:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:700:10: branch_false: ...to here Pillow-11.3.0/src/encode.c:700:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:706:5: branch_false: ...to here Pillow-11.3.0/src/encode.c:709:19: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:710:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:711:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:716:15: call_function: inlined call to ‘_Py_TYPE’ from ‘PyImaging_LibTiffEncoderNew’ Pillow-11.3.0/src/encode.c:716:15: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:716:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:718:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:718:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:726:21: branch_true: following ‘true’ branch (when ‘i != 36’)... Pillow-11.3.0/src/encode.c:727:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:727:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:726:40: branch_false: ...to here Pillow-11.3.0/src/encode.c:733:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:735:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:735:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:738:17: branch_false: ...to here Pillow-11.3.0/src/encode.c:738:16: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:739:32: branch_true: ...to here Pillow-11.3.0/src/encode.c:740:20: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:986:1: branch_true: ...to here Pillow-11.3.0/src/encode.c:764:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:768:16: branch_false: ...to here Pillow-11.3.0/src/encode.c:768:16: branch_false: following ‘false’ branch (when ‘type != 0’)... Pillow-11.3.0/src/encode.c:779:12: branch_false: ...to here Pillow-11.3.0/src/encode.c:779:12: branch_true: following ‘true’ branch (when ‘is_core_tag == 0’)... Pillow-11.3.0/src/encode.c:781:16: branch_true: ...to here Pillow-11.3.0/src/encode.c:784:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:791:13: branch_false: ...to here Pillow-11.3.0/src/encode.c:791:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:798:19: branch_false: ...to here Pillow-11.3.0/src/encode.c:798:19: branch_true: following ‘true’ branch (when ‘is_var_length != 0’)... Pillow-11.3.0/src/encode.c:801:19: branch_true: ...to here Pillow-11.3.0/src/encode.c:803:16: branch_false: following ‘false’ branch (when ‘key_int != 320’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:827:23: branch_false: following ‘false’ branch (when ‘key_int != 530’)... Pillow-11.3.0/src/encode.c:827:23: branch_false: ...to here Pillow-11.3.0/src/encode.c:915:22: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:916:20: branch_true: following ‘true’ branch (when ‘av’ is non-NULL)... Pillow-11.3.0/src/encode.c:916:20: branch_true: ...to here Pillow-11.3.0/src/encode.c:917:33: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:920:30: branch_false: ...to here Pillow-11.3.0/src/encode.c:920:30: throw: if ‘ImagingLibTiffSetField’ throws an exception... Pillow-11.3.0/src/encode.c:920:30: danger: ‘av’ leaks here; was allocated at [(78)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/77) # 918| av[i] = PyFloat_AsDouble(PyTuple_GetItem(value, i)); # 919| } # 920|-> status = ImagingLibTiffSetField( # 921| &encoder->state, (ttag_t)key_int, len, av # 922| ); Error: GCC_ANALYZER_WARNING (CWE-401): [#def36] Pillow-11.3.0/src/encode.c:1046:14: warning[-Wanalyzer-malloc-leak]: leak of ‘qarrays’ Pillow-11.3.0/src/encode.c:1012:1: enter_function: entry to ‘get_qtables_arrays’ Pillow-11.3.0/src/encode.c:1019:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1023:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1028:14: branch_false: ...to here Pillow-11.3.0/src/encode.c:1030:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1039:38: branch_false: ...to here Pillow-11.3.0/src/encode.c:1039:31: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:1040:8: branch_false: following ‘false’ branch (when ‘qarrays’ is non-NULL)... Pillow-11.3.0/src/encode.c:1040:8: branch_false: ...to here Pillow-11.3.0/src/encode.c:1044:17: branch_true: following ‘true’ branch (when ‘i < num_tables’)... Pillow-11.3.0/src/encode.c:1045:17: call_function: inlined call to ‘_Py_TYPE’ from ‘get_qtables_arrays’ Pillow-11.3.0/src/encode.c:1045:17: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1045:17: call_function: inlined call to ‘PyType_HasFeature’ from ‘get_qtables_arrays’ Pillow-11.3.0/src/encode.c:1045:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:1045:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:1046:14: throw: if ‘PySequence_Check’ throws an exception... Pillow-11.3.0/src/encode.c:1046:14: danger: ‘qarrays’ leaks here; was allocated at [(8)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/7) # 1044| for (i = 0; i < num_tables; i++) { # 1045| table = PySequence_Fast_GET_ITEM(tables, i); # 1046|-> if (!PySequence_Check(table)) { # 1047| PyErr_SetString(PyExc_ValueError, "Invalid quantization tables"); # 1048| goto JPEG_QTABLES_ERR; Error: GCC_ANALYZER_WARNING (CWE-401): [#def37] Pillow-11.3.0/src/encode.c:1047:13: warning[-Wanalyzer-malloc-leak]: leak of ‘qarrays’ Pillow-11.3.0/src/encode.c:1012:1: enter_function: entry to ‘get_qtables_arrays’ Pillow-11.3.0/src/encode.c:1019:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1023:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1028:14: branch_false: ...to here Pillow-11.3.0/src/encode.c:1030:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1039:38: branch_false: ...to here Pillow-11.3.0/src/encode.c:1039:31: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:1040:8: branch_false: following ‘false’ branch (when ‘qarrays’ is non-NULL)... Pillow-11.3.0/src/encode.c:1040:8: branch_false: ...to here Pillow-11.3.0/src/encode.c:1044:17: branch_true: following ‘true’ branch (when ‘i < num_tables’)... Pillow-11.3.0/src/encode.c:1045:17: call_function: inlined call to ‘_Py_TYPE’ from ‘get_qtables_arrays’ Pillow-11.3.0/src/encode.c:1045:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:1045:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:1046:12: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:1047:13: branch_true: ...to here Pillow-11.3.0/src/encode.c:1047:13: throw: if ‘PyErr_SetString’ throws an exception... Pillow-11.3.0/src/encode.c:1047:13: danger: ‘qarrays’ leaks here; was allocated at [(8)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/7) # 1045| table = PySequence_Fast_GET_ITEM(tables, i); # 1046| if (!PySequence_Check(table)) { # 1047|-> PyErr_SetString(PyExc_ValueError, "Invalid quantization tables"); # 1048| goto JPEG_QTABLES_ERR; # 1049| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def38] Pillow-11.3.0/src/encode.c:1050:13: warning[-Wanalyzer-malloc-leak]: leak of ‘qarrays’ Pillow-11.3.0/src/encode.c:1012:1: enter_function: entry to ‘get_qtables_arrays’ Pillow-11.3.0/src/encode.c:1019:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1023:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1028:14: branch_false: ...to here Pillow-11.3.0/src/encode.c:1030:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1039:38: branch_false: ...to here Pillow-11.3.0/src/encode.c:1039:31: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:1040:8: branch_false: following ‘false’ branch (when ‘qarrays’ is non-NULL)... Pillow-11.3.0/src/encode.c:1040:8: branch_false: ...to here Pillow-11.3.0/src/encode.c:1044:17: branch_true: following ‘true’ branch (when ‘i < num_tables’)... Pillow-11.3.0/src/encode.c:1045:17: call_function: inlined call to ‘_Py_TYPE’ from ‘get_qtables_arrays’ Pillow-11.3.0/src/encode.c:1045:17: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1045:17: call_function: inlined call to ‘PyType_HasFeature’ from ‘get_qtables_arrays’ Pillow-11.3.0/src/encode.c:1045:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:1045:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:1046:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1050:13: branch_false: ...to here Pillow-11.3.0/src/encode.c:1050:13: throw: if ‘PySequence_Size’ throws an exception... Pillow-11.3.0/src/encode.c:1050:13: danger: ‘qarrays’ leaks here; was allocated at [(8)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/7) # 1048| goto JPEG_QTABLES_ERR; # 1049| } # 1050|-> if (PySequence_Size(table) != DCTSIZE2) { # 1051| PyErr_SetString(PyExc_ValueError, "Invalid quantization table size"); # 1052| goto JPEG_QTABLES_ERR; Error: GCC_ANALYZER_WARNING (CWE-401): [#def39] Pillow-11.3.0/src/encode.c:1051:13: warning[-Wanalyzer-malloc-leak]: leak of ‘qarrays’ Pillow-11.3.0/src/encode.c:1012:1: enter_function: entry to ‘get_qtables_arrays’ Pillow-11.3.0/src/encode.c:1019:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1023:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1028:14: branch_false: ...to here Pillow-11.3.0/src/encode.c:1030:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1039:38: branch_false: ...to here Pillow-11.3.0/src/encode.c:1039:31: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:1040:8: branch_false: following ‘false’ branch (when ‘qarrays’ is non-NULL)... Pillow-11.3.0/src/encode.c:1040:8: branch_false: ...to here Pillow-11.3.0/src/encode.c:1044:17: branch_true: following ‘true’ branch (when ‘i < num_tables’)... Pillow-11.3.0/src/encode.c:1045:17: call_function: inlined call to ‘_Py_TYPE’ from ‘get_qtables_arrays’ Pillow-11.3.0/src/encode.c:1045:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:1045:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:1046:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1050:13: branch_false: ...to here Pillow-11.3.0/src/encode.c:1050:12: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:1051:13: branch_true: ...to here Pillow-11.3.0/src/encode.c:1051:13: throw: if ‘PyErr_SetString’ throws an exception... Pillow-11.3.0/src/encode.c:1051:13: danger: ‘qarrays’ leaks here; was allocated at [(8)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/7) # 1049| } # 1050| if (PySequence_Size(table) != DCTSIZE2) { # 1051|-> PyErr_SetString(PyExc_ValueError, "Invalid quantization table size"); # 1052| goto JPEG_QTABLES_ERR; # 1053| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def40] Pillow-11.3.0/src/encode.c:1054:22: warning[-Wanalyzer-malloc-leak]: leak of ‘qarrays’ Pillow-11.3.0/src/encode.c:1012:1: enter_function: entry to ‘get_qtables_arrays’ Pillow-11.3.0/src/encode.c:1019:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1023:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1028:14: branch_false: ...to here Pillow-11.3.0/src/encode.c:1030:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1039:38: branch_false: ...to here Pillow-11.3.0/src/encode.c:1039:31: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:1040:8: branch_false: following ‘false’ branch (when ‘qarrays’ is non-NULL)... Pillow-11.3.0/src/encode.c:1040:8: branch_false: ...to here Pillow-11.3.0/src/encode.c:1044:17: branch_true: following ‘true’ branch (when ‘i < num_tables’)... Pillow-11.3.0/src/encode.c:1045:17: call_function: inlined call to ‘_Py_TYPE’ from ‘get_qtables_arrays’ Pillow-11.3.0/src/encode.c:1045:17: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1045:17: call_function: inlined call to ‘PyType_HasFeature’ from ‘get_qtables_arrays’ Pillow-11.3.0/src/encode.c:1045:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:1045:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:1046:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1050:13: branch_false: ...to here Pillow-11.3.0/src/encode.c:1050:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1054:22: branch_false: ...to here Pillow-11.3.0/src/encode.c:1054:22: throw: if ‘PySequence_Fast’ throws an exception... Pillow-11.3.0/src/encode.c:1054:22: danger: ‘qarrays’ leaks here; was allocated at [(8)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/7) # 1052| goto JPEG_QTABLES_ERR; # 1053| } # 1054|-> table_data = PySequence_Fast(table, "expected a sequence"); # 1055| for (j = 0; j < DCTSIZE2; j++) { # 1056| qarrays[i * DCTSIZE2 + j] = Error: GCC_ANALYZER_WARNING (CWE-401): [#def41] Pillow-11.3.0/src/encode.c:1057:17: warning[-Wanalyzer-malloc-leak]: leak of ‘qarrays’ Pillow-11.3.0/src/encode.c:1012:1: enter_function: entry to ‘get_qtables_arrays’ Pillow-11.3.0/src/encode.c:1019:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1023:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1028:14: branch_false: ...to here Pillow-11.3.0/src/encode.c:1030:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1039:38: branch_false: ...to here Pillow-11.3.0/src/encode.c:1039:31: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:1040:8: branch_false: following ‘false’ branch (when ‘qarrays’ is non-NULL)... Pillow-11.3.0/src/encode.c:1040:8: branch_false: ...to here Pillow-11.3.0/src/encode.c:1044:17: branch_true: following ‘true’ branch (when ‘i < num_tables’)... Pillow-11.3.0/src/encode.c:1045:17: call_function: inlined call to ‘_Py_TYPE’ from ‘get_qtables_arrays’ Pillow-11.3.0/src/encode.c:1045:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:1045:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:1046:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1050:13: branch_false: ...to here Pillow-11.3.0/src/encode.c:1050:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1054:22: branch_false: ...to here Pillow-11.3.0/src/encode.c:1055:21: branch_true: following ‘true’ branch (when ‘j != 64’)... Pillow-11.3.0/src/encode.c:1057:17: call_function: inlined call to ‘_Py_TYPE’ from ‘get_qtables_arrays’ Pillow-11.3.0/src/encode.c:1057:17: branch_true: following ‘true’ branch... Pillow-11.3.0/src/encode.c:1057:17: branch_true: ...to here Pillow-11.3.0/src/encode.c:1057:17: throw: if ‘PyLong_AsLong’ throws an exception... Pillow-11.3.0/src/encode.c:1057:17: danger: ‘qarrays’ leaks here; was allocated at [(8)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/7) # 1055| for (j = 0; j < DCTSIZE2; j++) { # 1056| qarrays[i * DCTSIZE2 + j] = # 1057|-> PyLong_AS_LONG(PySequence_Fast_GET_ITEM(table_data, j)); # 1058| } # 1059| Py_DECREF(table_data); Error: GCC_ANALYZER_WARNING (CWE-401): [#def42] Pillow-11.3.0/src/encode.c:1066:9: warning[-Wanalyzer-malloc-leak]: leak of ‘qarrays’ Pillow-11.3.0/src/encode.c:1012:1: enter_function: entry to ‘get_qtables_arrays’ Pillow-11.3.0/src/encode.c:1019:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1023:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1028:14: branch_false: ...to here Pillow-11.3.0/src/encode.c:1030:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/encode.c:1039:38: branch_false: ...to here Pillow-11.3.0/src/encode.c:1039:31: acquire_memory: allocated here Pillow-11.3.0/src/encode.c:1040:8: branch_false: following ‘false’ branch (when ‘qarrays’ is non-NULL)... Pillow-11.3.0/src/encode.c:1040:8: branch_false: ...to here Pillow-11.3.0/src/encode.c:1044:17: branch_false: following ‘false’ branch (when ‘i >= num_tables’)... Pillow-11.3.0/src/encode.c:1062:5: branch_false: ...to here Pillow-11.3.0/src/encode.c:1065:5: call_function: inlined call to ‘Py_DECREF’ from ‘get_qtables_arrays’ Pillow-11.3.0/src/encode.c:1066:9: branch_true: ...to here Pillow-11.3.0/src/encode.c:1066:9: throw: if ‘PyErr_Occurred’ throws an exception... Pillow-11.3.0/src/encode.c:1066:9: danger: ‘qarrays’ leaks here; was allocated at [(8)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/7) # 1064| JPEG_QTABLES_ERR: # 1065| Py_DECREF(tables); // Run on both error and not error # 1066|-> if (PyErr_Occurred()) { # 1067| free(qarrays); # 1068| qarrays = NULL; Error: GCC_ANALYZER_WARNING (CWE-416): [#def43] Pillow-11.3.0/src/libImaging/Arrow.c:34:29: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘*array.children’ Pillow-11.3.0/src/libImaging/Arrow.c:96:1: enter_function: entry to ‘export_imaging_schema’ Pillow-11.3.0/src/libImaging/Arrow.c:99:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:104:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:104:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:108:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:108:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:112:14: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:112:14: call_function: calling ‘export_named_type’ from ‘export_imaging_schema’ Pillow-11.3.0/src/libImaging/Arrow.c:112:14: return_function: returning to ‘export_imaging_schema’ from ‘export_named_type’ Pillow-11.3.0/src/libImaging/Arrow.c:113:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:117:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:118:24: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Arrow.c:121:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:122:14: branch_true: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:123:9: release_memory: freed here Pillow-11.3.0/src/libImaging/Arrow.c:124:9: call_function: calling ‘ReleaseExportedSchema’ from ‘export_imaging_schema’ # 32| // Release children # 33| for (int64_t i = 0; i < array->n_children; ++i) { # 34|-> struct ArrowSchema *child = array->children[i]; # 35| if (child->release != NULL) { # 36| child->release(child); Error: COMPILER_WARNING: [#def44] Pillow-11.3.0/src/libImaging/Arrow.c: scope_hint: In function ‘export_named_type’ Pillow-11.3.0/src/libImaging/Arrow.c:78:5: warning[-Wstringop-truncation]: ‘__strncpy_chk’ specified bound depends on the length of the source argument # 78 | strncpy(formatp, format, format_len); # | ^ Pillow-11.3.0/src/libImaging/Arrow.c:63:25: note: length computed here # 63 | size_t format_len = strlen(format) + 1; # | ^~~~~~~~~~~~~~ # 76| } # 77| # 78|-> strncpy(formatp, format, format_len); # 79| strncpy(namep, name, name_len); # 80| Error: COMPILER_WARNING: [#def45] Pillow-11.3.0/src/libImaging/Arrow.c:79:5: warning[-Wstringop-truncation]: ‘__strncpy_chk’ specified bound depends on the length of the source argument # 79 | strncpy(namep, name, name_len); # | ^ Pillow-11.3.0/src/libImaging/Arrow.c:64:23: note: length computed here # 64 | size_t name_len = strlen(name) + 1; # | ^~~~~~~~~~~~ # 77| # 78| strncpy(formatp, format, format_len); # 79|-> strncpy(namep, name, name_len); # 80| # 81| *schema = (struct ArrowSchema){// Type description Error: GCC_ANALYZER_WARNING (CWE-476): [#def46] Pillow-11.3.0/src/libImaging/Arrow.c:81:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘schema’ Pillow-11.3.0/src/libImaging/Arrow.c:96:1: enter_function: entry to ‘export_imaging_schema’ Pillow-11.3.0/src/libImaging/Arrow.c:99:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:104:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:104:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:108:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:108:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:112:14: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:112:14: call_function: calling ‘export_named_type’ from ‘export_imaging_schema’ Pillow-11.3.0/src/libImaging/Arrow.c:112:14: return_function: returning to ‘export_imaging_schema’ from ‘export_named_type’ Pillow-11.3.0/src/libImaging/Arrow.c:113:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:117:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:119:49: acquire_memory: this call could return NULL Pillow-11.3.0/src/libImaging/Arrow.c:120:14: call_function: calling ‘export_named_type’ from ‘export_imaging_schema’ # 79| strncpy(namep, name, name_len); # 80| # 81|-> *schema = (struct ArrowSchema){// Type description # 82| .format = formatp, # 83| .name = namep, Error: GCC_ANALYZER_WARNING (CWE-476): [#def47] Pillow-11.3.0/src/libImaging/Arrow.c:119:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*schema.children’ Pillow-11.3.0/src/libImaging/Arrow.c:96:1: enter_function: entry to ‘export_imaging_schema’ Pillow-11.3.0/src/libImaging/Arrow.c:99:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:104:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:104:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:108:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:108:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:112:14: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:112:14: call_function: calling ‘export_named_type’ from ‘export_imaging_schema’ Pillow-11.3.0/src/libImaging/Arrow.c:112:14: return_function: returning to ‘export_imaging_schema’ from ‘export_named_type’ Pillow-11.3.0/src/libImaging/Arrow.c:113:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:117:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:118:24: acquire_memory: this call could return NULL Pillow-11.3.0/src/libImaging/Arrow.c:119:5: danger: ‘calloc(1, 8)’ could be NULL: unchecked value from [(19)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/18) # 117| schema->n_children = 1; # 118| schema->children = calloc(1, sizeof(struct ArrowSchema *)); # 119|-> schema->children[0] = (struct ArrowSchema *)calloc(1, sizeof(struct ArrowSchema)); # 120| retval = export_named_type(schema->children[0], im->arrow_band_format, "pixel"); # 121| if (retval != 0) { Error: GCC_ANALYZER_WARNING (CWE-476): [#def48] Pillow-11.3.0/src/libImaging/Arrow.c:190:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*array.buffers’ Pillow-11.3.0/src/libImaging/Arrow.c:162:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:166:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:188:37: acquire_memory: this call could return NULL Pillow-11.3.0/src/libImaging/Arrow.c:190:5: danger: ‘malloc(16)’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2) # 188| array->buffers = (const void **)malloc(sizeof(void *) * array->n_buffers); # 189| // assert(array->buffers != NULL); # 190|-> array->buffers[0] = NULL; // no nulls, null bitmap can be omitted # 191| # 192| if (im->block) { Error: GCC_ANALYZER_WARNING (CWE-476): [#def49] Pillow-11.3.0/src/libImaging/Arrow.c:271:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(2, 8)’ Pillow-11.3.0/src/libImaging/Arrow.c:205:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:209:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:234:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:238:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:243:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:246:47: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:247:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:252:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:268:24: acquire_memory: this call could return NULL Pillow-11.3.0/src/libImaging/Arrow.c:270:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:271:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:271:9: danger: ‘calloc(2, 8)’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/8) # 269| # 270| if (im->block) { # 271|-> array->children[0]->buffers[1] = im->block; # 272| } else { # 273| array->children[0]->buffers[1] = im->blocks[0].ptr; Error: GCC_ANALYZER_WARNING (CWE-476): [#def50] Pillow-11.3.0/src/libImaging/Arrow.c:273:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(2, 8)’ Pillow-11.3.0/src/libImaging/Arrow.c:205:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:209:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:234:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:238:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:243:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:246:47: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:247:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:252:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:268:24: acquire_memory: this call could return NULL Pillow-11.3.0/src/libImaging/Arrow.c:270:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:273:42: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:273:9: danger: ‘calloc(2, 8)’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/8) # 271| array->children[0]->buffers[1] = im->block; # 272| } else { # 273|-> array->children[0]->buffers[1] = im->blocks[0].ptr; # 274| } # 275| return 0; Error: GCC_ANALYZER_WARNING (CWE-476): [#def51] Pillow-11.3.0/src/libImaging/Arrow.c:278:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘*array.children’ Pillow-11.3.0/src/libImaging/Arrow.c:205:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:209:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:234:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:238:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:242:23: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Arrow.c:243:8: release_memory: assuming ‘*array.children’ is NULL Pillow-11.3.0/src/libImaging/Arrow.c:243:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:244:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:278:9: danger: dereference of NULL ‘*array.children’ # 276| # 277| err: # 278|-> if (array->children[0]) { # 279| free(array->children[0]); # 280| } Error: GCC_ANALYZER_WARNING (CWE-476): [#def52] Pillow-11.3.0/src/libImaging/Arrow.c:278:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ Pillow-11.3.0/src/libImaging/Arrow.c:205:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:209:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:234:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Arrow.c:235:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/Arrow.c:278:9: release_memory: using NULL here Pillow-11.3.0/src/libImaging/Arrow.c:278:9: danger: dereference of NULL ‘*array.children’ # 276| # 277| err: # 278|-> if (array->children[0]) { # 279| free(array->children[0]); # 280| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def53] Pillow-11.3.0/src/libImaging/BoxBlur.c:191:5: warning[-Wanalyzer-malloc-leak]: leak of ‘lineOut’ Pillow-11.3.0/src/libImaging/BoxBlur.c:323:1: enter_function: entry to ‘ImagingGaussianBlur’ Pillow-11.3.0/src/libImaging/BoxBlur.c:326:12: call_function: calling ‘ImagingBoxBlur’ from ‘ImagingGaussianBlur’ # 189| // printf(">>> %d %d %d\n", radius, ww, fw); # 190| # 191|-> ImagingSectionEnter(&cookie); # 192| # 193| if (imIn->image8) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def54] Pillow-11.3.0/src/libImaging/Convert.c:1415:13: warning[-Wanalyzer-malloc-leak]: leak of ‘errors’ Pillow-11.3.0/src/libImaging/Convert.c:1368:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1375:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1378:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1396:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1396:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1404:12: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1404:12: branch_true: following ‘true’ branch (when ‘dither != 0’)... Pillow-11.3.0/src/libImaging/Convert.c:1408:29: branch_true: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1408:22: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Convert.c:1409:16: branch_false: following ‘false’ branch (when ‘errors’ is non-NULL)... Pillow-11.3.0/src/libImaging/Convert.c:1415:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1415:13: throw: if ‘ImagingSectionEnter’ throws an exception... Pillow-11.3.0/src/libImaging/Convert.c:1415:13: danger: ‘errors’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8) # 1413| # 1414| /* Map each pixel to the nearest palette entry */ # 1415|-> ImagingSectionEnter(&cookie); # 1416| for (y = 0; y < imIn->ysize; y++) { # 1417| int r, r0, r1, r2; Error: GCC_ANALYZER_WARNING (CWE-401): [#def55] Pillow-11.3.0/src/libImaging/Convert.c:1439:25: warning[-Wanalyzer-malloc-leak]: leak of ‘errors’ Pillow-11.3.0/src/libImaging/Convert.c:1368:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1375:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1378:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1396:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1396:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1404:12: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1404:12: branch_true: following ‘true’ branch (when ‘dither != 0’)... Pillow-11.3.0/src/libImaging/Convert.c:1408:29: branch_true: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1408:22: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Convert.c:1409:16: branch_false: following ‘false’ branch (when ‘errors’ is non-NULL)... Pillow-11.3.0/src/libImaging/Convert.c:1415:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1416:25: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1420:38: branch_true: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1428:29: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1432:25: branch_true: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1441:24: branch_true: following ‘true’ branch (when the strings are equal)... Pillow-11.3.0/src/libImaging/Convert.c:1442:79: branch_true: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1428:29: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1432:25: branch_true: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1438:24: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1439:25: branch_true: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1439:25: throw: if ‘ImagingPaletteCacheUpdate’ throws an exception... Pillow-11.3.0/src/libImaging/Convert.c:1439:25: danger: ‘errors’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8) # 1437| cache = &ImagingPaletteCache(palette, r, g, b); # 1438| if (cache[0] == 0x100) { # 1439|-> ImagingPaletteCacheUpdate(palette, r, g, b); # 1440| } # 1441| if (alpha) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def56] Pillow-11.3.0/src/libImaging/Convert.c:1439:25: warning[-Wanalyzer-malloc-leak]: leak of ‘e’ Pillow-11.3.0/src/libImaging/Convert.c:1368:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1375:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1378:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1396:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1396:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1404:12: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1404:12: branch_true: following ‘true’ branch (when ‘dither != 0’)... Pillow-11.3.0/src/libImaging/Convert.c:1408:29: branch_true: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1408:22: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Convert.c:1409:16: branch_false: following ‘false’ branch (when ‘errors’ is non-NULL)... Pillow-11.3.0/src/libImaging/Convert.c:1415:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1416:25: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1420:38: branch_true: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1428:29: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1432:25: branch_true: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1438:24: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1439:25: branch_true: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1439:25: throw: if ‘ImagingPaletteCacheUpdate’ throws an exception... Pillow-11.3.0/src/libImaging/Convert.c:1439:25: danger: ‘e’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8) # 1437| cache = &ImagingPaletteCache(palette, r, g, b); # 1438| if (cache[0] == 0x100) { # 1439|-> ImagingPaletteCacheUpdate(palette, r, g, b); # 1440| } # 1441| if (alpha) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def57] Pillow-11.3.0/src/libImaging/Convert.c:1485:13: warning[-Wanalyzer-malloc-leak]: leak of ‘errors’ Pillow-11.3.0/src/libImaging/Convert.c:1368:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1375:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1378:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1396:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1396:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1404:12: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1404:12: branch_true: following ‘true’ branch (when ‘dither != 0’)... Pillow-11.3.0/src/libImaging/Convert.c:1408:29: branch_true: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1408:22: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Convert.c:1409:16: branch_false: following ‘false’ branch (when ‘errors’ is non-NULL)... Pillow-11.3.0/src/libImaging/Convert.c:1415:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1416:25: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1485:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1485:13: throw: if ‘ImagingSectionLeave’ throws an exception... Pillow-11.3.0/src/libImaging/Convert.c:1485:13: danger: ‘errors’ leaks here; was allocated at [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8) # 1483| e[2] = b2; # 1484| } # 1485|-> ImagingSectionLeave(&cookie); # 1486| free(errors); # 1487| Error: GCC_ANALYZER_WARNING (CWE-401): [#def58] Pillow-11.3.0/src/libImaging/Convert.c:1485:13: warning[-Wanalyzer-malloc-leak]: leak of ‘e’ Pillow-11.3.0/src/libImaging/Convert.c:1368:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1375:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1378:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1396:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1396:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1404:12: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1404:12: branch_true: following ‘true’ branch (when ‘dither != 0’)... Pillow-11.3.0/src/libImaging/Convert.c:1408:29: branch_true: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1408:22: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Convert.c:1409:16: branch_false: following ‘false’ branch (when ‘errors’ is non-NULL)... Pillow-11.3.0/src/libImaging/Convert.c:1415:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1416:25: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1420:38: branch_true: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1428:29: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1481:17: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1485:13: throw: if ‘ImagingSectionLeave’ throws an exception... Pillow-11.3.0/src/libImaging/Convert.c:1485:13: danger: ‘e’ leaks here; was allocated at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8) # 1483| e[2] = b2; # 1484| } # 1485|-> ImagingSectionLeave(&cookie); # 1486| free(errors); # 1487| Error: GCC_ANALYZER_WARNING (CWE-401): [#def59] Pillow-11.3.0/src/libImaging/Convert.c:1554:9: warning[-Wanalyzer-malloc-leak]: leak of ‘errors’ Pillow-11.3.0/src/libImaging/Convert.c:1542:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1546:21: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1546:14: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Convert.c:1547:8: branch_false: following ‘false’ branch (when ‘errors’ is non-NULL)... Pillow-11.3.0/src/libImaging/Convert.c:1552:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1552:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1554:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1554:9: throw: if ‘ImagingSectionEnter’ throws an exception... Pillow-11.3.0/src/libImaging/Convert.c:1554:9: danger: ‘errors’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2) # 1552| if (imIn->bands == 1) { # 1553| /* map each pixel to black or white, using error diffusion */ # 1554|-> ImagingSectionEnter(&cookie); # 1555| for (y = 0; y < imIn->ysize; y++) { # 1556| int l, l0, l1, l2, d2; Error: GCC_ANALYZER_WARNING (CWE-401): [#def60] Pillow-11.3.0/src/libImaging/Convert.c:1581:9: warning[-Wanalyzer-malloc-leak]: leak of ‘errors’ Pillow-11.3.0/src/libImaging/Convert.c:1542:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1546:21: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1546:14: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Convert.c:1547:8: branch_false: following ‘false’ branch (when ‘errors’ is non-NULL)... Pillow-11.3.0/src/libImaging/Convert.c:1552:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1552:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1554:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1555:21: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1581:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1581:9: throw: if ‘ImagingSectionLeave’ throws an exception... Pillow-11.3.0/src/libImaging/Convert.c:1581:9: danger: ‘errors’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2) # 1579| errors[x] = l0; # 1580| } # 1581|-> ImagingSectionLeave(&cookie); # 1582| # 1583| } else { Error: GCC_ANALYZER_WARNING (CWE-401): [#def61] Pillow-11.3.0/src/libImaging/Convert.c:1585:9: warning[-Wanalyzer-malloc-leak]: leak of ‘errors’ Pillow-11.3.0/src/libImaging/Convert.c:1542:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1546:21: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1546:14: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Convert.c:1547:8: branch_false: following ‘false’ branch (when ‘errors’ is non-NULL)... Pillow-11.3.0/src/libImaging/Convert.c:1552:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1552:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1585:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1585:9: throw: if ‘ImagingSectionEnter’ throws an exception... Pillow-11.3.0/src/libImaging/Convert.c:1585:9: danger: ‘errors’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2) # 1583| } else { # 1584| /* map each pixel to black or white, using error diffusion */ # 1585|-> ImagingSectionEnter(&cookie); # 1586| for (y = 0; y < imIn->ysize; y++) { # 1587| int l, l0, l1, l2, d2; Error: GCC_ANALYZER_WARNING (CWE-401): [#def62] Pillow-11.3.0/src/libImaging/Convert.c:1612:9: warning[-Wanalyzer-malloc-leak]: leak of ‘errors’ Pillow-11.3.0/src/libImaging/Convert.c:1542:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1546:21: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1546:14: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Convert.c:1547:8: branch_false: following ‘false’ branch (when ‘errors’ is non-NULL)... Pillow-11.3.0/src/libImaging/Convert.c:1552:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1552:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1585:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1586:21: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Convert.c:1612:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Convert.c:1612:9: throw: if ‘ImagingSectionLeave’ throws an exception... Pillow-11.3.0/src/libImaging/Convert.c:1612:9: danger: ‘errors’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2) # 1610| errors[x] = l0; # 1611| } # 1612|-> ImagingSectionLeave(&cookie); # 1613| } # 1614| Error: GCC_ANALYZER_WARNING (CWE-401): [#def63] Pillow-11.3.0/src/libImaging/Draw.c:509:17: warning[-Wanalyzer-malloc-leak]: leak of ‘edge_table’ Pillow-11.3.0/src/libImaging/Draw.c:2024:1: enter_function: entry to ‘ImagingDrawOutline’ Pillow-11.3.0/src/libImaging/Draw.c:2030:5: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Draw.c:2032:5: call_function: calling ‘polygon_generic’ from ‘ImagingDrawOutline’ # 507| if (e[i].ymin == e[i].ymax) { # 508| if (hasAlpha != 1) { # 509|-> (*hline)(im, e[i].xmin, e[i].ymin, e[i].xmax, ink, mask); # 510| } # 511| continue; Error: GCC_ANALYZER_WARNING (CWE-401): [#def64] Pillow-11.3.0/src/libImaging/Draw.c:588:9: warning[-Wanalyzer-malloc-leak]: leak of ‘edge_table’ Pillow-11.3.0/src/libImaging/Draw.c:2024:1: enter_function: entry to ‘ImagingDrawOutline’ Pillow-11.3.0/src/libImaging/Draw.c:2030:5: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Draw.c:2032:5: call_function: calling ‘polygon_generic’ from ‘ImagingDrawOutline’ # 586| } # 587| } # 588|-> qsort(xx, j, sizeof(float), x_cmp); # 589| if (hasAlpha == 1) { # 590| int x_pos = j == 0 ? -1 : 0; Error: GCC_ANALYZER_WARNING (CWE-401): [#def65] Pillow-11.3.0/src/libImaging/Draw.c:588:9: warning[-Wanalyzer-malloc-leak]: leak of ‘xx’ Pillow-11.3.0/src/libImaging/Draw.c:2024:1: enter_function: entry to ‘ImagingDrawOutline’ Pillow-11.3.0/src/libImaging/Draw.c:2030:5: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Draw.c:2032:5: call_function: calling ‘polygon_generic’ from ‘ImagingDrawOutline’ # 586| } # 587| } # 588|-> qsort(xx, j, sizeof(float), x_cmp); # 589| if (hasAlpha == 1) { # 590| int x_pos = j == 0 ? -1 : 0; Error: GCC_ANALYZER_WARNING (CWE-416): [#def66] Pillow-11.3.0/src/libImaging/Draw.c:1984:9: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘eIn’ Pillow-11.3.0/src/libImaging/Draw.c:1960:1: enter_function: entry to ‘ImagingOutlineTransform’ Pillow-11.3.0/src/libImaging/Draw.c:1977:12: call_function: calling ‘allocate’ from ‘ImagingOutlineTransform’ Pillow-11.3.0/src/libImaging/Draw.c:1977:12: return_function: returning to ‘ImagingOutlineTransform’ from ‘allocate’ Pillow-11.3.0/src/libImaging/Draw.c:1978:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Draw.c:1978:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Draw.c:1983:17: branch_true: following ‘true’ branch (when ‘i < n’)... Pillow-11.3.0/src/libImaging/Draw.c:1984:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/Draw.c:1984:9: danger: use after ‘free’ of ‘eIn’; freed at [(10)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/9) # 1982| # 1983| for (i = 0; i < n; i++) { # 1984|-> x0 = eIn->x0; # 1985| y0 = eIn->y0; # 1986| Error: GCC_ANALYZER_WARNING (CWE-401): [#def67] Pillow-11.3.0/src/libImaging/Geometry.c:913:5: warning[-Wanalyzer-malloc-leak]: leak of ‘xintab’ Pillow-11.3.0/src/libImaging/Geometry.c:851:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Geometry.c:871:21: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Geometry.c:872:8: branch_false: following ‘false’ branch (when ‘xintab’ is non-NULL)... Pillow-11.3.0/src/libImaging/Geometry.c:877:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Geometry.c:913:5: throw: if ‘ImagingSectionEnter’ throws an exception... Pillow-11.3.0/src/libImaging/Geometry.c:913:5: danger: ‘xintab’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2) # 911| } # 912| # 913|-> ImagingSectionEnter(&cookie); # 914| # 915| if (imIn->image8) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def68] Pillow-11.3.0/src/libImaging/Geometry.c:921:5: warning[-Wanalyzer-malloc-leak]: leak of ‘xintab’ Pillow-11.3.0/src/libImaging/Geometry.c:851:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Geometry.c:871:21: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Geometry.c:872:8: branch_false: following ‘false’ branch (when ‘xintab’ is non-NULL)... Pillow-11.3.0/src/libImaging/Geometry.c:877:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Geometry.c:915:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Geometry.c:915:8: branch_true: ...to here Pillow-11.3.0/src/libImaging/Geometry.c:921:5: throw: if ‘ImagingSectionLeave’ throws an exception... Pillow-11.3.0/src/libImaging/Geometry.c:921:5: danger: ‘xintab’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2) # 919| } # 920| # 921|-> ImagingSectionLeave(&cookie); # 922| # 923| #undef AFFINE_SCALE Error: GCC_ANALYZER_WARNING (CWE-401): [#def69] Pillow-11.3.0/src/libImaging/Histo.c:46:22: warning[-Wanalyzer-malloc-leak]: leak of ‘ImagingHistogramNew(im)’ Pillow-11.3.0/src/libImaging/Histo.c:60:1: enter_function: entry to ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:67:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Histo.c:71:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:81:9: call_function: calling ‘ImagingHistogramNew’ from ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:81:9: return_function: returning to ‘ImagingGetHistogram’ from ‘ImagingHistogramNew’ Pillow-11.3.0/src/libImaging/Histo.c:82:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: following ‘false’ branch (when ‘imMask’ is NULL)... Pillow-11.3.0/src/libImaging/Histo.c:121:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:121:12: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Histo.c:122:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Histo.c:122:13: throw: if ‘ImagingSectionEnter’ throws an exception... Pillow-11.3.0/src/libImaging/Histo.c:46:22: danger: ‘ImagingHistogramNew(im)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5) # 44| return (ImagingHistogram)ImagingError_MemoryError(); # 45| } # 46|-> strncpy(h->mode, im->mode, IMAGING_MODE_LENGTH - 1); # 47| h->mode[IMAGING_MODE_LENGTH - 1] = 0; # 48| Error: GCC_ANALYZER_WARNING (CWE-401): [#def70] Pillow-11.3.0/src/libImaging/Histo.c:89:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ Pillow-11.3.0/src/libImaging/Histo.c:60:1: enter_function: entry to ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:67:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Histo.c:71:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:73:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:81:9: call_function: calling ‘ImagingHistogramNew’ from ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:81:9: return_function: returning to ‘ImagingGetHistogram’ from ‘ImagingHistogramNew’ Pillow-11.3.0/src/libImaging/Histo.c:82:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_true: following ‘true’ branch (when ‘imMask’ is non-NULL)... Pillow-11.3.0/src/libImaging/Histo.c:88:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Histo.c:88:12: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Histo.c:89:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Histo.c:89:13: throw: if ‘ImagingSectionEnter’ throws an exception... Pillow-11.3.0/src/libImaging/Histo.c:89:13: danger: ‘<unknown>’ leaks here; was allocated at [(11)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/10) # 87| /* mask */ # 88| if (im->image8) { # 89|-> ImagingSectionEnter(&cookie); # 90| for (y = 0; y < im->ysize; y++) { # 91| for (x = 0; x < im->xsize; x++) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def71] Pillow-11.3.0/src/libImaging/Histo.c:97:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ Pillow-11.3.0/src/libImaging/Histo.c:60:1: enter_function: entry to ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:67:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Histo.c:71:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:73:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:81:9: call_function: calling ‘ImagingHistogramNew’ from ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:81:9: return_function: returning to ‘ImagingGetHistogram’ from ‘ImagingHistogramNew’ Pillow-11.3.0/src/libImaging/Histo.c:82:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_true: following ‘true’ branch (when ‘imMask’ is non-NULL)... Pillow-11.3.0/src/libImaging/Histo.c:88:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Histo.c:88:12: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Histo.c:89:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Histo.c:90:25: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:97:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:97:13: throw: if ‘ImagingSectionLeave’ throws an exception... Pillow-11.3.0/src/libImaging/Histo.c:97:13: danger: ‘<unknown>’ leaks here; was allocated at [(11)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/10) # 95| } # 96| } # 97|-> ImagingSectionLeave(&cookie); # 98| } else { /* yes, we need the braces. C isn't Python! */ # 99| if (im->type != IMAGING_TYPE_UINT8) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def72] Pillow-11.3.0/src/libImaging/Histo.c:103:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ Pillow-11.3.0/src/libImaging/Histo.c:60:1: enter_function: entry to ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:67:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Histo.c:71:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:73:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:81:9: call_function: calling ‘ImagingHistogramNew’ from ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:81:9: return_function: returning to ‘ImagingGetHistogram’ from ‘ImagingHistogramNew’ Pillow-11.3.0/src/libImaging/Histo.c:82:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_true: following ‘true’ branch (when ‘imMask’ is non-NULL)... Pillow-11.3.0/src/libImaging/Histo.c:88:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Histo.c:88:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:99:17: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:99:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:103:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:103:13: throw: if ‘ImagingSectionEnter’ throws an exception... Pillow-11.3.0/src/libImaging/Histo.c:103:13: danger: ‘<unknown>’ leaks here; was allocated at [(11)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/10) # 101| return ImagingError_ModeError(); # 102| } # 103|-> ImagingSectionEnter(&cookie); # 104| for (y = 0; y < im->ysize; y++) { # 105| UINT8 *in = (UINT8 *)im->image32[y]; Error: GCC_ANALYZER_WARNING (CWE-401): [#def73] Pillow-11.3.0/src/libImaging/Histo.c:117:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ Pillow-11.3.0/src/libImaging/Histo.c:60:1: enter_function: entry to ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:67:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Histo.c:71:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:73:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:81:9: call_function: calling ‘ImagingHistogramNew’ from ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:81:9: return_function: returning to ‘ImagingGetHistogram’ from ‘ImagingHistogramNew’ Pillow-11.3.0/src/libImaging/Histo.c:82:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_true: following ‘true’ branch (when ‘imMask’ is non-NULL)... Pillow-11.3.0/src/libImaging/Histo.c:88:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Histo.c:88:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:99:17: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:99:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:103:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:104:25: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:117:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:117:13: throw: if ‘ImagingSectionLeave’ throws an exception... Pillow-11.3.0/src/libImaging/Histo.c:117:13: danger: ‘<unknown>’ leaks here; was allocated at [(11)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/10) # 115| } # 116| } # 117|-> ImagingSectionLeave(&cookie); # 118| } # 119| } else { Error: GCC_ANALYZER_WARNING (CWE-401): [#def74] Pillow-11.3.0/src/libImaging/Histo.c:122:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ Pillow-11.3.0/src/libImaging/Histo.c:60:1: enter_function: entry to ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:67:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Histo.c:71:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:81:9: call_function: calling ‘ImagingHistogramNew’ from ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:81:9: return_function: returning to ‘ImagingGetHistogram’ from ‘ImagingHistogramNew’ Pillow-11.3.0/src/libImaging/Histo.c:82:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: following ‘false’ branch (when ‘imMask’ is NULL)... Pillow-11.3.0/src/libImaging/Histo.c:121:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:121:12: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Histo.c:122:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Histo.c:122:13: throw: if ‘ImagingSectionEnter’ throws an exception... Pillow-11.3.0/src/libImaging/Histo.c:122:13: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/8) # 120| /* mask not given; process pixels in image */ # 121| if (im->image8) { # 122|-> ImagingSectionEnter(&cookie); # 123| for (y = 0; y < im->ysize; y++) { # 124| for (x = 0; x < im->xsize; x++) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def75] Pillow-11.3.0/src/libImaging/Histo.c:128:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ Pillow-11.3.0/src/libImaging/Histo.c:60:1: enter_function: entry to ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:67:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Histo.c:71:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:81:9: call_function: calling ‘ImagingHistogramNew’ from ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:81:9: return_function: returning to ‘ImagingGetHistogram’ from ‘ImagingHistogramNew’ Pillow-11.3.0/src/libImaging/Histo.c:82:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: following ‘false’ branch (when ‘imMask’ is NULL)... Pillow-11.3.0/src/libImaging/Histo.c:121:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:121:12: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Histo.c:122:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Histo.c:123:25: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:128:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:128:13: throw: if ‘ImagingSectionLeave’ throws an exception... Pillow-11.3.0/src/libImaging/Histo.c:128:13: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/8) # 126| } # 127| } # 128|-> ImagingSectionLeave(&cookie); # 129| } else { # 130| switch (im->type) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def76] Pillow-11.3.0/src/libImaging/Histo.c:132:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ Pillow-11.3.0/src/libImaging/Histo.c:60:1: enter_function: entry to ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:67:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Histo.c:71:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:81:9: call_function: calling ‘ImagingHistogramNew’ from ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:81:9: return_function: returning to ‘ImagingGetHistogram’ from ‘ImagingHistogramNew’ Pillow-11.3.0/src/libImaging/Histo.c:82:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: following ‘false’ branch (when ‘imMask’ is NULL)... Pillow-11.3.0/src/libImaging/Histo.c:121:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:121:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:130:21: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:132:21: throw: if ‘ImagingSectionEnter’ throws an exception... Pillow-11.3.0/src/libImaging/Histo.c:132:21: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/8) # 130| switch (im->type) { # 131| case IMAGING_TYPE_UINT8: # 132|-> ImagingSectionEnter(&cookie); # 133| for (y = 0; y < im->ysize; y++) { # 134| UINT8 *in = (UINT8 *)im->image[y]; Error: GCC_ANALYZER_WARNING (CWE-401): [#def77] Pillow-11.3.0/src/libImaging/Histo.c:142:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ Pillow-11.3.0/src/libImaging/Histo.c:60:1: enter_function: entry to ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:67:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Histo.c:71:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:81:9: call_function: calling ‘ImagingHistogramNew’ from ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:81:9: return_function: returning to ‘ImagingGetHistogram’ from ‘ImagingHistogramNew’ Pillow-11.3.0/src/libImaging/Histo.c:82:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: following ‘false’ branch (when ‘imMask’ is NULL)... Pillow-11.3.0/src/libImaging/Histo.c:121:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:121:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:130:21: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:133:33: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:142:21: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:142:21: throw: if ‘ImagingSectionLeave’ throws an exception... Pillow-11.3.0/src/libImaging/Histo.c:142:21: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/8) # 140| } # 141| } # 142|-> ImagingSectionLeave(&cookie); # 143| break; # 144| case IMAGING_TYPE_INT32: Error: GCC_ANALYZER_WARNING (CWE-401): [#def78] Pillow-11.3.0/src/libImaging/Histo.c:157:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ Pillow-11.3.0/src/libImaging/Histo.c:60:1: enter_function: entry to ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:67:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Histo.c:71:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:81:9: call_function: calling ‘ImagingHistogramNew’ from ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:81:9: return_function: returning to ‘ImagingGetHistogram’ from ‘ImagingHistogramNew’ Pillow-11.3.0/src/libImaging/Histo.c:82:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: following ‘false’ branch (when ‘imMask’ is NULL)... Pillow-11.3.0/src/libImaging/Histo.c:121:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:121:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:130:21: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:145:24: branch_false: following ‘false’ branch (when ‘minmax’ is non-NULL)... Pillow-11.3.0/src/libImaging/Histo.c:149:26: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:149:24: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:154:24: branch_false: following ‘false’ branch (when ‘imin < imax’)... Pillow-11.3.0/src/libImaging/Histo.c:157:21: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:157:21: throw: if ‘ImagingSectionEnter’ throws an exception... Pillow-11.3.0/src/libImaging/Histo.c:157:21: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/8) # 155| break; # 156| } # 157|-> ImagingSectionEnter(&cookie); # 158| scale = 255.0F / (imax - imin); # 159| for (y = 0; y < im->ysize; y++) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def79] Pillow-11.3.0/src/libImaging/Histo.c:168:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ Pillow-11.3.0/src/libImaging/Histo.c:60:1: enter_function: entry to ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:67:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Histo.c:71:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:81:9: call_function: calling ‘ImagingHistogramNew’ from ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:81:9: return_function: returning to ‘ImagingGetHistogram’ from ‘ImagingHistogramNew’ Pillow-11.3.0/src/libImaging/Histo.c:82:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: following ‘false’ branch (when ‘imMask’ is NULL)... Pillow-11.3.0/src/libImaging/Histo.c:121:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:121:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:130:21: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:145:24: branch_false: following ‘false’ branch (when ‘minmax’ is non-NULL)... Pillow-11.3.0/src/libImaging/Histo.c:149:26: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:149:24: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:154:24: branch_false: following ‘false’ branch (when ‘imin < imax’)... Pillow-11.3.0/src/libImaging/Histo.c:157:21: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:159:33: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:168:21: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:168:21: throw: if ‘ImagingSectionLeave’ throws an exception... Pillow-11.3.0/src/libImaging/Histo.c:168:21: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/8) # 166| } # 167| } # 168|-> ImagingSectionLeave(&cookie); # 169| break; # 170| case IMAGING_TYPE_FLOAT32: Error: GCC_ANALYZER_WARNING (CWE-401): [#def80] Pillow-11.3.0/src/libImaging/Histo.c:183:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ Pillow-11.3.0/src/libImaging/Histo.c:60:1: enter_function: entry to ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:67:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Histo.c:71:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:81:9: call_function: calling ‘ImagingHistogramNew’ from ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:81:9: return_function: returning to ‘ImagingGetHistogram’ from ‘ImagingHistogramNew’ Pillow-11.3.0/src/libImaging/Histo.c:82:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: following ‘false’ branch (when ‘imMask’ is NULL)... Pillow-11.3.0/src/libImaging/Histo.c:121:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:121:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:130:21: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:171:24: branch_false: following ‘false’ branch (when ‘minmax’ is non-NULL)... Pillow-11.3.0/src/libImaging/Histo.c:175:26: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:175:24: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:180:24: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:183:21: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:183:21: throw: if ‘ImagingSectionEnter’ throws an exception... Pillow-11.3.0/src/libImaging/Histo.c:183:21: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/8) # 181| break; # 182| } # 183|-> ImagingSectionEnter(&cookie); # 184| scale = 255.0F / (fmax - fmin); # 185| for (y = 0; y < im->ysize; y++) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def81] Pillow-11.3.0/src/libImaging/Histo.c:194:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ Pillow-11.3.0/src/libImaging/Histo.c:60:1: enter_function: entry to ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:67:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Histo.c:71:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:81:9: call_function: calling ‘ImagingHistogramNew’ from ‘ImagingGetHistogram’ Pillow-11.3.0/src/libImaging/Histo.c:81:9: return_function: returning to ‘ImagingGetHistogram’ from ‘ImagingHistogramNew’ Pillow-11.3.0/src/libImaging/Histo.c:82:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:86:8: branch_false: following ‘false’ branch (when ‘imMask’ is NULL)... Pillow-11.3.0/src/libImaging/Histo.c:121:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:121:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:130:21: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:171:24: branch_false: following ‘false’ branch (when ‘minmax’ is non-NULL)... Pillow-11.3.0/src/libImaging/Histo.c:175:26: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:175:24: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:180:24: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:183:21: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:185:33: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Histo.c:194:21: branch_false: ...to here Pillow-11.3.0/src/libImaging/Histo.c:194:21: throw: if ‘ImagingSectionLeave’ throws an exception... Pillow-11.3.0/src/libImaging/Histo.c:194:21: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/8) # 192| } # 193| } # 194|-> ImagingSectionLeave(&cookie); # 195| break; # 196| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def82] Pillow-11.3.0/src/libImaging/Quant.c:157:12: warning[-Wanalyzer-malloc-leak]: leak of ‘d’ Pillow-11.3.0/src/libImaging/Quant.c:1291:1: enter_function: entry to ‘quantize’ Pillow-11.3.0/src/libImaging/Quant.c:1321:9: call_function: calling ‘create_pixel_hash’ from ‘quantize’ # 155| return NULL; # 156| } # 157|-> hash = hashtable_new(pixel_hash, pixel_cmp); # 158| hashtable_set_user_data(hash, d); # 159| d->scale = 0; Error: GCC_ANALYZER_WARNING (CWE-401): [#def83] Pillow-11.3.0/src/libImaging/Quant.c:157:12: warning[-Wanalyzer-malloc-leak]: leak of ‘p’ Pillow-11.3.0/src/libImaging/Quant.c:1665:1: enter_function: entry to ‘ImagingQuantize’ Pillow-11.3.0/src/libImaging/Quant.c:1678:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1681:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1681:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1687:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1697:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1701:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1701:9: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1702:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1711:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1775:22: call_function: calling ‘quantize’ from ‘ImagingQuantize’ # 155| return NULL; # 156| } # 157|-> hash = hashtable_new(pixel_hash, pixel_cmp); # 158| hashtable_set_user_data(hash, d); # 159| d->scale = 0; Error: GCC_ANALYZER_WARNING (CWE-401): [#def84] Pillow-11.3.0/src/libImaging/Quant.c:158:5: warning[-Wanalyzer-malloc-leak]: leak of ‘d’ Pillow-11.3.0/src/libImaging/Quant.c:1291:1: enter_function: entry to ‘quantize’ Pillow-11.3.0/src/libImaging/Quant.c:1321:9: call_function: calling ‘create_pixel_hash’ from ‘quantize’ # 156| } # 157| hash = hashtable_new(pixel_hash, pixel_cmp); # 158|-> hashtable_set_user_data(hash, d); # 159| d->scale = 0; # 160| #ifdef DEBUG Error: GCC_ANALYZER_WARNING (CWE-401): [#def85] Pillow-11.3.0/src/libImaging/Quant.c:158:5: warning[-Wanalyzer-malloc-leak]: leak of ‘p’ Pillow-11.3.0/src/libImaging/Quant.c:1665:1: enter_function: entry to ‘ImagingQuantize’ Pillow-11.3.0/src/libImaging/Quant.c:1678:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1681:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1681:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1687:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1697:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1701:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1701:9: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1702:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1711:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1775:22: call_function: calling ‘quantize’ from ‘ImagingQuantize’ # 156| } # 157| hash = hashtable_new(pixel_hash, pixel_cmp); # 158|-> hashtable_set_user_data(hash, d); # 159| d->scale = 0; # 160| #ifdef DEBUG Error: GCC_ANALYZER_WARNING (CWE-401): [#def86] Pillow-11.3.0/src/libImaging/Quant.c:164:14: warning[-Wanalyzer-malloc-leak]: leak of ‘p’ Pillow-11.3.0/src/libImaging/Quant.c:1665:1: enter_function: entry to ‘ImagingQuantize’ Pillow-11.3.0/src/libImaging/Quant.c:1678:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1681:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1681:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1687:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1697:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1701:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1701:9: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1702:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1711:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1775:22: call_function: calling ‘quantize’ from ‘ImagingQuantize’ # 162| #endif # 163| for (i = 0; i < nPixels; i++) { # 164|-> if (!hashtable_insert_or_update_computed( # 165| hash, pixelData[i], new_count_func, exists_count_func # 166| )) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def87] Pillow-11.3.0/src/libImaging/Quant.c:169:16: warning[-Wanalyzer-malloc-leak]: leak of ‘p’ Pillow-11.3.0/src/libImaging/Quant.c:1665:1: enter_function: entry to ‘ImagingQuantize’ Pillow-11.3.0/src/libImaging/Quant.c:1678:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1681:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1681:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1687:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1697:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1701:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1701:9: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1702:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1711:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1775:22: call_function: calling ‘quantize’ from ‘ImagingQuantize’ # 167| ; # 168| } # 169|-> while (hashtable_get_count(hash) > MAX_HASH_ENTRIES) { # 170| d->scale++; # 171| #ifdef DEBUG Error: GCC_ANALYZER_WARNING (CWE-401): [#def88] Pillow-11.3.0/src/libImaging/Quant.c:663:9: warning[-Wanalyzer-malloc-leak]: leak of ‘p’ Pillow-11.3.0/src/libImaging/Quant.c:1665:1: enter_function: entry to ‘ImagingQuantize’ Pillow-11.3.0/src/libImaging/Quant.c:1678:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1681:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1681:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1687:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1697:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1701:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1701:9: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1702:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1711:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1775:22: call_function: calling ‘quantize’ from ‘ImagingQuantize’ # 661| BoxNode *thisNode; # 662| # 663|-> h = ImagingQuantHeapNew(box_heap_cmp); # 664| /* malloc check ok, small constant allocation */ # 665| root = malloc(sizeof(BoxNode)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def89] Pillow-11.3.0/src/libImaging/Quant.c:836:9: warning[-Wanalyzer-malloc-leak]: leak of ‘avgDistSortKey’ Pillow-11.3.0/src/libImaging/Quant.c:1566:1: enter_function: entry to ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1587:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1601:17: branch_true: following ‘true’ branch (when ‘i < nQuantPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1602:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1617:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1622:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1623:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1628:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1628:22: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1629:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1633:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1633:10: call_function: calling ‘build_distance_tables’ from ‘quantize2’ # 834| dwi[j] = (DistanceWithIndex){&(avgDist[i * nEntries + j]), j}; # 835| } # 836|-> qsort(dwi, nEntries, sizeof(DistanceWithIndex), _distance_index_cmp); # 837| for (j = 0; j < nEntries; j++) { # 838| avgDistSortKey[i * nEntries + j] = dwi[j].distance; Error: GCC_ANALYZER_WARNING (CWE-401): [#def90] Pillow-11.3.0/src/libImaging/Quant.c:836:9: warning[-Wanalyzer-malloc-leak]: leak of ‘avgDist’ Pillow-11.3.0/src/libImaging/Quant.c:1566:1: enter_function: entry to ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1587:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1601:17: branch_true: following ‘true’ branch (when ‘i < nQuantPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1602:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1617:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1622:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1622:15: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1623:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1628:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1629:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1633:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1633:10: call_function: calling ‘build_distance_tables’ from ‘quantize2’ # 834| dwi[j] = (DistanceWithIndex){&(avgDist[i * nEntries + j]), j}; # 835| } # 836|-> qsort(dwi, nEntries, sizeof(DistanceWithIndex), _distance_index_cmp); # 837| for (j = 0; j < nEntries; j++) { # 838| avgDistSortKey[i * nEntries + j] = dwi[j].distance; Error: GCC_ANALYZER_WARNING (CWE-401): [#def91] Pillow-11.3.0/src/libImaging/Quant.c:836:9: warning[-Wanalyzer-malloc-leak]: leak of ‘count’ Pillow-11.3.0/src/libImaging/Quant.c:1159:1: enter_function: entry to ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1179:19: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1179:8: branch_false: following ‘false’ branch (when ‘count’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1179:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1182:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1183:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_false: following ‘false’ branch (when ‘i == 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1193:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1197:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1198:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1203:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1204:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1204:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1213:12: branch_true: following ‘true’ branch (when ‘built == 0’)... Pillow-11.3.0/src/libImaging/Quant.c:1214:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1214:13: call_function: calling ‘compute_palette_from_quantized_pixels’ from ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1214:13: return_function: returning to ‘k_means’ from ‘compute_palette_from_quantized_pixels’ Pillow-11.3.0/src/libImaging/Quant.c:1217:18: call_function: calling ‘build_distance_tables’ from ‘k_means’ # 834| dwi[j] = (DistanceWithIndex){&(avgDist[i * nEntries + j]), j}; # 835| } # 836|-> qsort(dwi, nEntries, sizeof(DistanceWithIndex), _distance_index_cmp); # 837| for (j = 0; j < nEntries; j++) { # 838| avgDistSortKey[i * nEntries + j] = dwi[j].distance; Error: GCC_ANALYZER_WARNING (CWE-401): [#def92] Pillow-11.3.0/src/libImaging/Quant.c:836:9: warning[-Wanalyzer-malloc-leak]: leak of ‘dwi’ Pillow-11.3.0/src/libImaging/Quant.c:1566:1: enter_function: entry to ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1587:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1601:17: branch_true: following ‘true’ branch (when ‘i < nQuantPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1602:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1617:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1622:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1623:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1628:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1629:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1633:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1633:10: call_function: calling ‘build_distance_tables’ from ‘quantize2’ # 834| dwi[j] = (DistanceWithIndex){&(avgDist[i * nEntries + j]), j}; # 835| } # 836|-> qsort(dwi, nEntries, sizeof(DistanceWithIndex), _distance_index_cmp); # 837| for (j = 0; j < nEntries; j++) { # 838| avgDistSortKey[i * nEntries + j] = dwi[j].distance; Error: GCC_ANALYZER_WARNING (CWE-401): [#def93] Pillow-11.3.0/src/libImaging/Quant.c:836:9: warning[-Wanalyzer-malloc-leak]: leak of ‘p’ Pillow-11.3.0/src/libImaging/Quant.c:1566:1: enter_function: entry to ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1586:9: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1587:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1601:17: branch_true: following ‘true’ branch (when ‘i < nQuantPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1602:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1617:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1622:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1623:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1628:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1629:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1633:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1633:10: call_function: calling ‘build_distance_tables’ from ‘quantize2’ # 834| dwi[j] = (DistanceWithIndex){&(avgDist[i * nEntries + j]), j}; # 835| } # 836|-> qsort(dwi, nEntries, sizeof(DistanceWithIndex), _distance_index_cmp); # 837| for (j = 0; j < nEntries; j++) { # 838| avgDistSortKey[i * nEntries + j] = dwi[j].distance; Error: GCC_ANALYZER_WARNING (CWE-401): [#def94] Pillow-11.3.0/src/libImaging/Quant.c:836:9: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’ Pillow-11.3.0/src/libImaging/Quant.c:1566:1: enter_function: entry to ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1587:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1601:17: branch_true: following ‘true’ branch (when ‘i < nQuantPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1602:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1612:10: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1617:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1622:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1623:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1628:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1629:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1633:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1633:10: call_function: calling ‘build_distance_tables’ from ‘quantize2’ # 834| dwi[j] = (DistanceWithIndex){&(avgDist[i * nEntries + j]), j}; # 835| } # 836|-> qsort(dwi, nEntries, sizeof(DistanceWithIndex), _distance_index_cmp); # 837| for (j = 0; j < nEntries; j++) { # 838| avgDistSortKey[i * nEntries + j] = dwi[j].distance; Error: GCC_ANALYZER_WARNING (CWE-401): [#def95] Pillow-11.3.0/src/libImaging/Quant.c:862:10: warning[-Wanalyzer-malloc-leak]: leak of ‘avgDistSortKey’ Pillow-11.3.0/src/libImaging/Quant.c:1566:1: enter_function: entry to ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1587:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1601:17: branch_false: following ‘false’ branch (when ‘i >= nQuantPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1609:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1617:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1622:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1623:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1628:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1628:22: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1629:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1633:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1633:10: call_function: calling ‘build_distance_tables’ from ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1633:10: return_function: returning to ‘quantize2’ from ‘build_distance_tables’ Pillow-11.3.0/src/libImaging/Quant.c:1633:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1637:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1637:10: call_function: calling ‘map_image_pixels’ from ‘quantize2’ # 860| HashTable *h2; # 861| # 862|-> h2 = hashtable_new(unshifted_pixel_hash, unshifted_pixel_cmp); # 863| for (i = 0; i < nPixels; i++) { # 864| if (!hashtable_lookup(h2, pixelData[i], &bestmatch)) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def96] Pillow-11.3.0/src/libImaging/Quant.c:862:10: warning[-Wanalyzer-malloc-leak]: leak of ‘avgDist’ Pillow-11.3.0/src/libImaging/Quant.c:1566:1: enter_function: entry to ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1587:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1601:17: branch_false: following ‘false’ branch (when ‘i >= nQuantPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1609:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1617:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1622:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1622:15: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1623:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1628:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1629:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1633:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1633:10: call_function: calling ‘build_distance_tables’ from ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1633:10: return_function: returning to ‘quantize2’ from ‘build_distance_tables’ Pillow-11.3.0/src/libImaging/Quant.c:1633:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1637:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1637:10: call_function: calling ‘map_image_pixels’ from ‘quantize2’ # 860| HashTable *h2; # 861| # 862|-> h2 = hashtable_new(unshifted_pixel_hash, unshifted_pixel_cmp); # 863| for (i = 0; i < nPixels; i++) { # 864| if (!hashtable_lookup(h2, pixelData[i], &bestmatch)) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def97] Pillow-11.3.0/src/libImaging/Quant.c:862:10: warning[-Wanalyzer-malloc-leak]: leak of ‘p’ Pillow-11.3.0/src/libImaging/Quant.c:1566:1: enter_function: entry to ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1586:9: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1587:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1601:17: branch_false: following ‘false’ branch (when ‘i >= nQuantPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1609:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1617:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1622:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1623:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1628:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1629:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1633:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1633:10: call_function: calling ‘build_distance_tables’ from ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1633:10: return_function: returning to ‘quantize2’ from ‘build_distance_tables’ Pillow-11.3.0/src/libImaging/Quant.c:1633:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1637:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1637:10: call_function: calling ‘map_image_pixels’ from ‘quantize2’ # 860| HashTable *h2; # 861| # 862|-> h2 = hashtable_new(unshifted_pixel_hash, unshifted_pixel_cmp); # 863| for (i = 0; i < nPixels; i++) { # 864| if (!hashtable_lookup(h2, pixelData[i], &bestmatch)) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def98] Pillow-11.3.0/src/libImaging/Quant.c:862:10: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’ Pillow-11.3.0/src/libImaging/Quant.c:1566:1: enter_function: entry to ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1587:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1601:17: branch_false: following ‘false’ branch (when ‘i >= nQuantPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1609:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1612:10: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1617:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1622:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1623:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1628:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1629:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1633:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1633:10: call_function: calling ‘build_distance_tables’ from ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1633:10: return_function: returning to ‘quantize2’ from ‘build_distance_tables’ Pillow-11.3.0/src/libImaging/Quant.c:1633:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1637:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1637:10: call_function: calling ‘map_image_pixels’ from ‘quantize2’ # 860| HashTable *h2; # 861| # 862|-> h2 = hashtable_new(unshifted_pixel_hash, unshifted_pixel_cmp); # 863| for (i = 0; i < nPixels; i++) { # 864| if (!hashtable_lookup(h2, pixelData[i], &bestmatch)) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def99] Pillow-11.3.0/src/libImaging/Quant.c:864:14: warning[-Wanalyzer-malloc-leak]: leak of ‘avgDistSortKey’ Pillow-11.3.0/src/libImaging/Quant.c:1566:1: enter_function: entry to ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1587:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1592:17: branch_true: following ‘true’ branch (when ‘i < nPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1593:38: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1601:17: branch_false: following ‘false’ branch (when ‘i >= nQuantPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1609:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1617:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1622:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1623:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1628:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1628:22: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1629:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1633:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1633:10: call_function: calling ‘build_distance_tables’ from ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1633:10: return_function: returning to ‘quantize2’ from ‘build_distance_tables’ Pillow-11.3.0/src/libImaging/Quant.c:1633:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1637:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1637:10: call_function: calling ‘map_image_pixels’ from ‘quantize2’ # 862| h2 = hashtable_new(unshifted_pixel_hash, unshifted_pixel_cmp); # 863| for (i = 0; i < nPixels; i++) { # 864|-> if (!hashtable_lookup(h2, pixelData[i], &bestmatch)) { # 865| bestmatch = 0; # 866| initialdist = _DISTSQR(paletteData + bestmatch, pixelData + i); Error: GCC_ANALYZER_WARNING (CWE-401): [#def100] Pillow-11.3.0/src/libImaging/Quant.c:864:14: warning[-Wanalyzer-malloc-leak]: leak of ‘avgDist’ Pillow-11.3.0/src/libImaging/Quant.c:1566:1: enter_function: entry to ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1587:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1592:17: branch_true: following ‘true’ branch (when ‘i < nPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1593:38: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1601:17: branch_false: following ‘false’ branch (when ‘i >= nQuantPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1609:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1617:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1622:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1622:15: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1623:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1628:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1629:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1633:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1633:10: call_function: calling ‘build_distance_tables’ from ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1633:10: return_function: returning to ‘quantize2’ from ‘build_distance_tables’ Pillow-11.3.0/src/libImaging/Quant.c:1633:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1637:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1637:10: call_function: calling ‘map_image_pixels’ from ‘quantize2’ # 862| h2 = hashtable_new(unshifted_pixel_hash, unshifted_pixel_cmp); # 863| for (i = 0; i < nPixels; i++) { # 864|-> if (!hashtable_lookup(h2, pixelData[i], &bestmatch)) { # 865| bestmatch = 0; # 866| initialdist = _DISTSQR(paletteData + bestmatch, pixelData + i); Error: GCC_ANALYZER_WARNING (CWE-401): [#def101] Pillow-11.3.0/src/libImaging/Quant.c:864:14: warning[-Wanalyzer-malloc-leak]: leak of ‘p’ Pillow-11.3.0/src/libImaging/Quant.c:1566:1: enter_function: entry to ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1586:9: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1587:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1592:17: branch_true: following ‘true’ branch (when ‘i < nPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1593:38: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1601:17: branch_false: following ‘false’ branch (when ‘i >= nQuantPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1609:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1617:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1622:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1623:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1628:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1629:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1633:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1633:10: call_function: calling ‘build_distance_tables’ from ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1633:10: return_function: returning to ‘quantize2’ from ‘build_distance_tables’ Pillow-11.3.0/src/libImaging/Quant.c:1633:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1637:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1637:10: call_function: calling ‘map_image_pixels’ from ‘quantize2’ # 862| h2 = hashtable_new(unshifted_pixel_hash, unshifted_pixel_cmp); # 863| for (i = 0; i < nPixels; i++) { # 864|-> if (!hashtable_lookup(h2, pixelData[i], &bestmatch)) { # 865| bestmatch = 0; # 866| initialdist = _DISTSQR(paletteData + bestmatch, pixelData + i); Error: GCC_ANALYZER_WARNING (CWE-401): [#def102] Pillow-11.3.0/src/libImaging/Quant.c:864:14: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’ Pillow-11.3.0/src/libImaging/Quant.c:1566:1: enter_function: entry to ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1587:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1592:17: branch_true: following ‘true’ branch (when ‘i < nPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1593:38: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1601:17: branch_false: following ‘false’ branch (when ‘i >= nQuantPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1609:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1612:10: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1617:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1622:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1623:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1628:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1629:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1633:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1633:10: call_function: calling ‘build_distance_tables’ from ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1633:10: return_function: returning to ‘quantize2’ from ‘build_distance_tables’ Pillow-11.3.0/src/libImaging/Quant.c:1633:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1637:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1637:10: call_function: calling ‘map_image_pixels’ from ‘quantize2’ # 862| h2 = hashtable_new(unshifted_pixel_hash, unshifted_pixel_cmp); # 863| for (i = 0; i < nPixels; i++) { # 864|-> if (!hashtable_lookup(h2, pixelData[i], &bestmatch)) { # 865| bestmatch = 0; # 866| initialdist = _DISTSQR(paletteData + bestmatch, pixelData + i); Error: GCC_ANALYZER_WARNING (CWE-401): [#def103] Pillow-11.3.0/src/libImaging/Quant.c:887:5: warning[-Wanalyzer-malloc-leak]: leak of ‘avgDistSortKey’ Pillow-11.3.0/src/libImaging/Quant.c:1566:1: enter_function: entry to ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1587:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1601:17: branch_false: following ‘false’ branch (when ‘i >= nQuantPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1609:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1617:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1622:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1623:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1628:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1628:22: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1629:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1633:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1633:10: call_function: calling ‘build_distance_tables’ from ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1633:10: return_function: returning to ‘quantize2’ from ‘build_distance_tables’ Pillow-11.3.0/src/libImaging/Quant.c:1633:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1637:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1637:10: call_function: calling ‘map_image_pixels’ from ‘quantize2’ # 885| pixelArray[i] = bestmatch; # 886| } # 887|-> hashtable_free(h2); # 888| return 1; # 889| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def104] Pillow-11.3.0/src/libImaging/Quant.c:887:5: warning[-Wanalyzer-malloc-leak]: leak of ‘avgDist’ Pillow-11.3.0/src/libImaging/Quant.c:1566:1: enter_function: entry to ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1587:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1601:17: branch_false: following ‘false’ branch (when ‘i >= nQuantPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1609:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1617:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1622:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1622:15: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1623:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1628:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1629:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1633:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1633:10: call_function: calling ‘build_distance_tables’ from ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1633:10: return_function: returning to ‘quantize2’ from ‘build_distance_tables’ Pillow-11.3.0/src/libImaging/Quant.c:1633:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1637:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1637:10: call_function: calling ‘map_image_pixels’ from ‘quantize2’ # 885| pixelArray[i] = bestmatch; # 886| } # 887|-> hashtable_free(h2); # 888| return 1; # 889| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def105] Pillow-11.3.0/src/libImaging/Quant.c:887:5: warning[-Wanalyzer-malloc-leak]: leak of ‘p’ Pillow-11.3.0/src/libImaging/Quant.c:1566:1: enter_function: entry to ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1586:9: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1587:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1601:17: branch_false: following ‘false’ branch (when ‘i >= nQuantPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1609:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1617:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1622:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1623:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1628:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1629:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1633:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1633:10: call_function: calling ‘build_distance_tables’ from ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1633:10: return_function: returning to ‘quantize2’ from ‘build_distance_tables’ Pillow-11.3.0/src/libImaging/Quant.c:1633:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1637:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1637:10: call_function: calling ‘map_image_pixels’ from ‘quantize2’ # 885| pixelArray[i] = bestmatch; # 886| } # 887|-> hashtable_free(h2); # 888| return 1; # 889| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def106] Pillow-11.3.0/src/libImaging/Quant.c:887:5: warning[-Wanalyzer-malloc-leak]: leak of ‘qp’ Pillow-11.3.0/src/libImaging/Quant.c:1566:1: enter_function: entry to ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1587:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1601:17: branch_false: following ‘false’ branch (when ‘i >= nQuantPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1609:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1612:10: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: following ‘false’ branch (when ‘qp’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1613:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1617:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1622:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1623:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1628:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1629:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1633:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1633:10: call_function: calling ‘build_distance_tables’ from ‘quantize2’ Pillow-11.3.0/src/libImaging/Quant.c:1633:10: return_function: returning to ‘quantize2’ from ‘build_distance_tables’ Pillow-11.3.0/src/libImaging/Quant.c:1633:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1637:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1637:10: call_function: calling ‘map_image_pixels’ from ‘quantize2’ # 885| pixelArray[i] = bestmatch; # 886| } # 887|-> hashtable_free(h2); # 888| return 1; # 889| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def107] Pillow-11.3.0/src/libImaging/Quant.c:911:10: warning[-Wanalyzer-malloc-leak]: leak of ‘avgDistSortKey’ Pillow-11.3.0/src/libImaging/Quant.c:1159:1: enter_function: entry to ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1179:8: branch_false: following ‘false’ branch (when ‘count’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1179:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1182:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1183:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_false: following ‘false’ branch (when ‘i == 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1193:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1197:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1198:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1203:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1203:22: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1204:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1204:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1213:12: branch_true: following ‘true’ branch (when ‘built == 0’)... Pillow-11.3.0/src/libImaging/Quant.c:1214:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1214:13: call_function: calling ‘compute_palette_from_quantized_pixels’ from ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1214:13: return_function: returning to ‘k_means’ from ‘compute_palette_from_quantized_pixels’ Pillow-11.3.0/src/libImaging/Quant.c:1217:18: call_function: calling ‘build_distance_tables’ from ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1217:18: return_function: returning to ‘k_means’ from ‘build_distance_tables’ Pillow-11.3.0/src/libImaging/Quant.c:1217:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1229:19: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1229:19: call_function: calling ‘map_image_pixels_from_quantized_pixels’ from ‘k_means’ # 909| int changes = 0; # 910| # 911|-> h2 = hashtable_new(unshifted_pixel_hash, unshifted_pixel_cmp); # 912| for (i = 0; i < nPixels; i++) { # 913| if (!hashtable_lookup(h2, pixelData[i], &bestmatch)) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def108] Pillow-11.3.0/src/libImaging/Quant.c:911:10: warning[-Wanalyzer-malloc-leak]: leak of ‘count’ Pillow-11.3.0/src/libImaging/Quant.c:1159:1: enter_function: entry to ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1179:19: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1179:8: branch_false: following ‘false’ branch (when ‘count’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1179:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1182:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1183:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_false: following ‘false’ branch (when ‘i == 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1193:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1197:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1198:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1203:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1204:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1204:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1213:12: branch_true: following ‘true’ branch (when ‘built == 0’)... Pillow-11.3.0/src/libImaging/Quant.c:1214:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1214:13: call_function: calling ‘compute_palette_from_quantized_pixels’ from ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1214:13: return_function: returning to ‘k_means’ from ‘compute_palette_from_quantized_pixels’ Pillow-11.3.0/src/libImaging/Quant.c:1217:18: call_function: calling ‘build_distance_tables’ from ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1217:18: return_function: returning to ‘k_means’ from ‘build_distance_tables’ Pillow-11.3.0/src/libImaging/Quant.c:1217:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1229:19: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1229:19: call_function: calling ‘map_image_pixels_from_quantized_pixels’ from ‘k_means’ # 909| int changes = 0; # 910| # 911|-> h2 = hashtable_new(unshifted_pixel_hash, unshifted_pixel_cmp); # 912| for (i = 0; i < nPixels; i++) { # 913| if (!hashtable_lookup(h2, pixelData[i], &bestmatch)) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def109] Pillow-11.3.0/src/libImaging/Quant.c:913:14: warning[-Wanalyzer-malloc-leak]: leak of ‘avgDistSortKey’ Pillow-11.3.0/src/libImaging/Quant.c:1159:1: enter_function: entry to ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1179:8: branch_false: following ‘false’ branch (when ‘count’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1179:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1182:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1183:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_false: following ‘false’ branch (when ‘i == 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1193:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1197:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1198:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1203:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1203:22: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1204:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1204:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1213:12: branch_true: following ‘true’ branch (when ‘built == 0’)... Pillow-11.3.0/src/libImaging/Quant.c:1214:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1214:13: call_function: calling ‘compute_palette_from_quantized_pixels’ from ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1214:13: return_function: returning to ‘k_means’ from ‘compute_palette_from_quantized_pixels’ Pillow-11.3.0/src/libImaging/Quant.c:1217:18: call_function: calling ‘build_distance_tables’ from ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1217:18: return_function: returning to ‘k_means’ from ‘build_distance_tables’ Pillow-11.3.0/src/libImaging/Quant.c:1217:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1229:19: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1229:19: call_function: calling ‘map_image_pixels_from_quantized_pixels’ from ‘k_means’ # 911| h2 = hashtable_new(unshifted_pixel_hash, unshifted_pixel_cmp); # 912| for (i = 0; i < nPixels; i++) { # 913|-> if (!hashtable_lookup(h2, pixelData[i], &bestmatch)) { # 914| bestmatch = pixelArray[i]; # 915| initialdist = _DISTSQR(paletteData + bestmatch, pixelData + i); Error: GCC_ANALYZER_WARNING (CWE-401): [#def110] Pillow-11.3.0/src/libImaging/Quant.c:913:14: warning[-Wanalyzer-malloc-leak]: leak of ‘count’ Pillow-11.3.0/src/libImaging/Quant.c:1159:1: enter_function: entry to ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1179:19: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1179:8: branch_false: following ‘false’ branch (when ‘count’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1179:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1182:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1183:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_false: following ‘false’ branch (when ‘i == 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1193:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1197:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1198:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1203:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1204:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1204:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1213:12: branch_true: following ‘true’ branch (when ‘built == 0’)... Pillow-11.3.0/src/libImaging/Quant.c:1214:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1214:13: call_function: calling ‘compute_palette_from_quantized_pixels’ from ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1214:13: return_function: returning to ‘k_means’ from ‘compute_palette_from_quantized_pixels’ Pillow-11.3.0/src/libImaging/Quant.c:1217:18: call_function: calling ‘build_distance_tables’ from ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1217:18: return_function: returning to ‘k_means’ from ‘build_distance_tables’ Pillow-11.3.0/src/libImaging/Quant.c:1217:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1229:19: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1229:19: call_function: calling ‘map_image_pixels_from_quantized_pixels’ from ‘k_means’ # 911| h2 = hashtable_new(unshifted_pixel_hash, unshifted_pixel_cmp); # 912| for (i = 0; i < nPixels; i++) { # 913|-> if (!hashtable_lookup(h2, pixelData[i], &bestmatch)) { # 914| bestmatch = pixelArray[i]; # 915| initialdist = _DISTSQR(paletteData + bestmatch, pixelData + i); Error: GCC_ANALYZER_WARNING (CWE-401): [#def111] Pillow-11.3.0/src/libImaging/Quant.c:932:13: warning[-Wanalyzer-malloc-leak]: leak of ‘avgDistSortKey’ Pillow-11.3.0/src/libImaging/Quant.c:1159:1: enter_function: entry to ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1179:8: branch_false: following ‘false’ branch (when ‘count’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1179:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1182:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1183:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_false: following ‘false’ branch (when ‘i == 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1193:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1197:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1198:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1203:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1203:22: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1204:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1204:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1213:12: branch_true: following ‘true’ branch (when ‘built == 0’)... Pillow-11.3.0/src/libImaging/Quant.c:1214:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1214:13: call_function: calling ‘compute_palette_from_quantized_pixels’ from ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1214:13: return_function: returning to ‘k_means’ from ‘compute_palette_from_quantized_pixels’ Pillow-11.3.0/src/libImaging/Quant.c:1217:18: call_function: calling ‘build_distance_tables’ from ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1217:18: return_function: returning to ‘k_means’ from ‘build_distance_tables’ Pillow-11.3.0/src/libImaging/Quant.c:1217:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1229:19: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1229:19: call_function: calling ‘map_image_pixels_from_quantized_pixels’ from ‘k_means’ # 930| } # 931| } # 932|-> hashtable_insert(h2, pixelData[i], bestmatch); # 933| } # 934| if (pixelArray[i] != bestmatch) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def112] Pillow-11.3.0/src/libImaging/Quant.c:932:13: warning[-Wanalyzer-malloc-leak]: leak of ‘count’ Pillow-11.3.0/src/libImaging/Quant.c:1159:1: enter_function: entry to ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1179:19: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1179:8: branch_false: following ‘false’ branch (when ‘count’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1179:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1182:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1183:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_false: following ‘false’ branch (when ‘i == 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1193:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1197:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1198:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1203:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1204:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1204:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1213:12: branch_true: following ‘true’ branch (when ‘built == 0’)... Pillow-11.3.0/src/libImaging/Quant.c:1214:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1214:13: call_function: calling ‘compute_palette_from_quantized_pixels’ from ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1214:13: return_function: returning to ‘k_means’ from ‘compute_palette_from_quantized_pixels’ Pillow-11.3.0/src/libImaging/Quant.c:1217:18: call_function: calling ‘build_distance_tables’ from ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1217:18: return_function: returning to ‘k_means’ from ‘build_distance_tables’ Pillow-11.3.0/src/libImaging/Quant.c:1217:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1229:19: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1229:19: call_function: calling ‘map_image_pixels_from_quantized_pixels’ from ‘k_means’ # 930| } # 931| } # 932|-> hashtable_insert(h2, pixelData[i], bestmatch); # 933| } # 934| if (pixelArray[i] != bestmatch) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def113] Pillow-11.3.0/src/libImaging/Quant.c:947:5: warning[-Wanalyzer-malloc-leak]: leak of ‘avgDistSortKey’ Pillow-11.3.0/src/libImaging/Quant.c:1159:1: enter_function: entry to ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1179:8: branch_false: following ‘false’ branch (when ‘count’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1179:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1182:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1183:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_false: following ‘false’ branch (when ‘i == 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1193:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1197:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1198:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1203:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1203:22: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1204:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1204:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1213:12: branch_true: following ‘true’ branch (when ‘built == 0’)... Pillow-11.3.0/src/libImaging/Quant.c:1214:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1214:13: call_function: calling ‘compute_palette_from_quantized_pixels’ from ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1214:13: return_function: returning to ‘k_means’ from ‘compute_palette_from_quantized_pixels’ Pillow-11.3.0/src/libImaging/Quant.c:1217:18: call_function: calling ‘build_distance_tables’ from ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1217:18: return_function: returning to ‘k_means’ from ‘build_distance_tables’ Pillow-11.3.0/src/libImaging/Quant.c:1217:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1229:19: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1229:19: call_function: calling ‘map_image_pixels_from_quantized_pixels’ from ‘k_means’ # 945| } # 946| } # 947|-> hashtable_free(h2); # 948| return changes; # 949| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def114] Pillow-11.3.0/src/libImaging/Quant.c:947:5: warning[-Wanalyzer-malloc-leak]: leak of ‘count’ Pillow-11.3.0/src/libImaging/Quant.c:1159:1: enter_function: entry to ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1179:19: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1179:8: branch_false: following ‘false’ branch (when ‘count’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1179:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1182:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1183:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_true: following ‘true’ branch (when ‘i != 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1187:24: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1187:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1185:24: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_false: following ‘false’ branch (when ‘i == 3’)... Pillow-11.3.0/src/libImaging/Quant.c:1185:17: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1193:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1197:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1198:8: branch_false: following ‘false’ branch (when ‘avgDist’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1203:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1204:8: branch_false: following ‘false’ branch (when ‘avgDistSortKey’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1204:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1213:12: branch_true: following ‘true’ branch (when ‘built == 0’)... Pillow-11.3.0/src/libImaging/Quant.c:1214:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1214:13: call_function: calling ‘compute_palette_from_quantized_pixels’ from ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1214:13: return_function: returning to ‘k_means’ from ‘compute_palette_from_quantized_pixels’ Pillow-11.3.0/src/libImaging/Quant.c:1217:18: call_function: calling ‘build_distance_tables’ from ‘k_means’ Pillow-11.3.0/src/libImaging/Quant.c:1217:18: return_function: returning to ‘k_means’ from ‘build_distance_tables’ Pillow-11.3.0/src/libImaging/Quant.c:1217:16: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1229:19: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1229:19: call_function: calling ‘map_image_pixels_from_quantized_pixels’ from ‘k_means’ # 945| } # 946| } # 947|-> hashtable_free(h2); # 948| return changes; # 949| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def115] Pillow-11.3.0/src/libImaging/Quant.c:1335:5: warning[-Wanalyzer-malloc-leak]: leak of ‘p’ Pillow-11.3.0/src/libImaging/Quant.c:1665:1: enter_function: entry to ‘ImagingQuantize’ Pillow-11.3.0/src/libImaging/Quant.c:1678:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1681:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1681:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1687:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1697:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1701:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1701:9: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1702:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1711:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1775:22: call_function: calling ‘quantize’ from ‘ImagingQuantize’ # 1333| #endif # 1334| hl[0] = hl[1] = hl[2] = NULL; # 1335|-> hashtable_foreach(h, hash_to_list, hl); # 1336| #ifdef DEBUG # 1337| printf("done (%f)\n", (clock() - timer) / (double)CLOCKS_PER_SEC); Error: GCC_ANALYZER_WARNING (CWE-401): [#def116] Pillow-11.3.0/src/libImaging/Quant.c:1591:9: warning[-Wanalyzer-malloc-leak]: leak of ‘p’ Pillow-11.3.0/src/libImaging/Quant.c:1586:9: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1587:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1591:9: throw: if ‘hashtable_new’ throws an exception... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: danger: ‘p’ leaks here; was allocated at [(1)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/0) # 1589| } # 1590| mean[0] = mean[1] = mean[2] = 0; # 1591|-> h = hashtable_new(unshifted_pixel_hash, unshifted_pixel_cmp); # 1592| for (i = 0; i < nPixels; i++) { # 1593| hashtable_insert(h, pixelData[i], 0xffffffff); Error: GCC_ANALYZER_WARNING (CWE-401): [#def117] Pillow-11.3.0/src/libImaging/Quant.c:1593:9: warning[-Wanalyzer-malloc-leak]: leak of ‘p’ Pillow-11.3.0/src/libImaging/Quant.c:1586:9: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1587:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1592:17: branch_true: following ‘true’ branch (when ‘i < nPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1593:38: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1593:9: throw: if ‘hashtable_insert’ throws an exception... Pillow-11.3.0/src/libImaging/Quant.c:1593:9: danger: ‘p’ leaks here; was allocated at [(1)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/0) # 1591| h = hashtable_new(unshifted_pixel_hash, unshifted_pixel_cmp); # 1592| for (i = 0; i < nPixels; i++) { # 1593|-> hashtable_insert(h, pixelData[i], 0xffffffff); # 1594| mean[0] += pixelData[i].c.r; # 1595| mean[1] += pixelData[i].c.g; Error: GCC_ANALYZER_WARNING (CWE-401): [#def118] Pillow-11.3.0/src/libImaging/Quant.c:1605:9: warning[-Wanalyzer-malloc-leak]: leak of ‘p’ Pillow-11.3.0/src/libImaging/Quant.c:1586:9: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1587:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1601:17: branch_true: following ‘true’ branch (when ‘i < nQuantPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1602:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1605:9: throw: if ‘hashtable_foreach_update’ throws an exception... Pillow-11.3.0/src/libImaging/Quant.c:1605:9: danger: ‘p’ leaks here; was allocated at [(1)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/0) # 1603| data.furthestV = pixelData[0].v; # 1604| data.secondPixel = (i == 1) ? 1 : 0; # 1605|-> hashtable_foreach_update(h, compute_distances, &data); # 1606| p[i].v = data.furthestV; # 1607| data.new.v = data.furthestV; Error: GCC_ANALYZER_WARNING (CWE-401): [#def119] Pillow-11.3.0/src/libImaging/Quant.c:1609:5: warning[-Wanalyzer-malloc-leak]: leak of ‘p’ Pillow-11.3.0/src/libImaging/Quant.c:1586:9: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1587:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1591:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1601:17: branch_false: following ‘false’ branch (when ‘i >= nQuantPixels’)... Pillow-11.3.0/src/libImaging/Quant.c:1609:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1609:5: throw: if ‘hashtable_free’ throws an exception... Pillow-11.3.0/src/libImaging/Quant.c:1609:5: danger: ‘p’ leaks here; was allocated at [(1)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/0) # 1607| data.new.v = data.furthestV; # 1608| } # 1609|-> hashtable_free(h); # 1610| # 1611| /* malloc check ok, using calloc */ Error: GCC_ANALYZER_WARNING (CWE-401): [#def120] Pillow-11.3.0/src/libImaging/Quant.c:1770:5: warning[-Wanalyzer-malloc-leak]: leak of ‘p’ Pillow-11.3.0/src/libImaging/Quant.c:1678:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1681:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1681:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1687:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1697:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1701:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1701:9: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1702:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1711:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1770:5: throw: if ‘ImagingSectionEnter’ throws an exception... Pillow-11.3.0/src/libImaging/Quant.c:1770:5: danger: ‘p’ leaks here; was allocated at [(7)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/6) # 1768| } # 1769| # 1770|-> ImagingSectionEnter(&cookie); # 1771| # 1772| switch (mode) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def121] Pillow-11.3.0/src/libImaging/Quant.c:1798:22: warning[-Wanalyzer-malloc-leak]: leak of ‘p’ Pillow-11.3.0/src/libImaging/Quant.c:1678:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1681:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1681:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1687:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1697:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1701:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1701:9: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1702:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1711:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1798:22: throw: if ‘quantize_octree’ throws an exception... Pillow-11.3.0/src/libImaging/Quant.c:1798:22: danger: ‘p’ leaks here; was allocated at [(7)](sarif:/runs/0/results/45/codeFlows/0/threadFlows/0/locations/6) # 1796| break; # 1797| case 2: # 1798|-> result = quantize_octree( # 1799| p, # 1800| im->xsize * im->ysize, Error: GCC_ANALYZER_WARNING (CWE-401): [#def122] Pillow-11.3.0/src/libImaging/Quant.c:1810:22: warning[-Wanalyzer-malloc-leak]: leak of ‘p’ Pillow-11.3.0/src/libImaging/Quant.c:1678:8: branch_false: following ‘false’ branch (when ‘im’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1681:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1681:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1687:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1697:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Quant.c:1701:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1701:9: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/Quant.c:1702:8: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)... Pillow-11.3.0/src/libImaging/Quant.c:1711:10: branch_false: ...to here Pillow-11.3.0/src/libImaging/Quant.c:1810:22: throw: if ‘quantize_pngquant’ throws an exception... Pillow-11.3.0/src/libImaging/Quant.c:1810:22: danger: ‘p’ leaks here; was allocated at [(7)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/6) # 1808| case 3: # 1809| #ifdef HAVE_LIBIMAGEQUANT # 1810|-> result = quantize_pngquant( # 1811| p, # 1812| im->xsize, Error: GCC_ANALYZER_WARNING (CWE-401): [#def123] Pillow-11.3.0/src/libImaging/QuantPngQuant.c:91:19: warning[-Wanalyzer-malloc-leak]: leak of ‘charMatrixRows’ Pillow-11.3.0/src/libImaging/QuantPngQuant.c:44:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/QuantPngQuant.c:47:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/QuantPngQuant.c:53:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/QuantPngQuant.c:58:13: branch_false: ...to here Pillow-11.3.0/src/libImaging/QuantPngQuant.c:59:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/QuantPngQuant.c:62:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/QuantPngQuant.c:69:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/QuantPngQuant.c:69:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/QuantPngQuant.c:81:8: branch_false: following ‘false’ branch (when ‘charMatrix’ is non-NULL)... Pillow-11.3.0/src/libImaging/QuantPngQuant.c:84:22: branch_false: ...to here Pillow-11.3.0/src/libImaging/QuantPngQuant.c:84:22: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/QuantPngQuant.c:85:8: branch_false: following ‘false’ branch (when ‘charMatrixRows’ is non-NULL)... Pillow-11.3.0/src/libImaging/QuantPngQuant.c:85:8: branch_false: ...to here Pillow-11.3.0/src/libImaging/QuantPngQuant.c:91:19: throw: if ‘liq_write_remapped_image_rows’ throws an exception... Pillow-11.3.0/src/libImaging/QuantPngQuant.c:91:19: danger: ‘charMatrixRows’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10) # 89| charMatrixRows[y] = &charMatrix[y * width]; # 90| } # 91|-> if (LIQ_OK != liq_write_remapped_image_rows(remap, image, charMatrixRows)) { # 92| goto err; # 93| } Error: GCC_ANALYZER_WARNING (CWE-457): [#def124] Pillow-11.3.0/src/libImaging/RankFilter.c:60:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’ Pillow-11.3.0/src/libImaging/RankFilter.c:62:13: enter_function: entry to ‘ImagingRankFilter’ Pillow-11.3.0/src/libImaging/RankFilter.c:67:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:71:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:76:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:76:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:83:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:87:58: branch_false: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:88:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:114:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:114:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:115:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:115:9: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)... Pillow-11.3.0/src/libImaging/RankFilter.c:115:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:115:9: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:115:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:115:9: branch_false: following ‘false’ branch (when ‘i >= size’)... Pillow-11.3.0/src/libImaging/RankFilter.c:115:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:115:9: call_function: calling ‘RankUINT8’ from ‘ImagingRankFilter’ # 58| } # 59| # 60|-> MakeRankFunction(UINT8) MakeRankFunction(INT32) MakeRankFunction(FLOAT32) # 61| # 62| Imaging ImagingRankFilter(Imaging im, int size, int rank) { Error: GCC_ANALYZER_WARNING (CWE-457): [#def125] Pillow-11.3.0/src/libImaging/RankFilter.c:60:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’ Pillow-11.3.0/src/libImaging/RankFilter.c:62:13: enter_function: entry to ‘ImagingRankFilter’ Pillow-11.3.0/src/libImaging/RankFilter.c:67:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:71:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:76:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:76:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:83:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:87:58: branch_false: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:88:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:114:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:114:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:116:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:116:15: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:117:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:117:9: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)... Pillow-11.3.0/src/libImaging/RankFilter.c:117:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:117:9: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:117:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:117:9: branch_false: following ‘false’ branch (when ‘i >= size’)... Pillow-11.3.0/src/libImaging/RankFilter.c:117:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:117:9: call_function: calling ‘RankINT32’ from ‘ImagingRankFilter’ # 58| } # 59| # 60|-> MakeRankFunction(UINT8) MakeRankFunction(INT32) MakeRankFunction(FLOAT32) # 61| # 62| Imaging ImagingRankFilter(Imaging im, int size, int rank) { Error: GCC_ANALYZER_WARNING (CWE-457): [#def126] Pillow-11.3.0/src/libImaging/RankFilter.c:60:49: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’ Pillow-11.3.0/src/libImaging/RankFilter.c:62:13: enter_function: entry to ‘ImagingRankFilter’ Pillow-11.3.0/src/libImaging/RankFilter.c:67:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:71:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:76:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:76:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:83:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:87:58: branch_false: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:88:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:114:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:114:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:116:16: branch_false: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:116:15: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:118:15: branch_false: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:118:15: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:119:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:119:9: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)... Pillow-11.3.0/src/libImaging/RankFilter.c:119:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:119:9: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/RankFilter.c:119:9: branch_true: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:119:9: branch_false: following ‘false’ branch (when ‘i >= size’)... Pillow-11.3.0/src/libImaging/RankFilter.c:119:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/RankFilter.c:119:9: call_function: calling ‘RankFLOAT32’ from ‘ImagingRankFilter’ # 58| } # 59| # 60|-> MakeRankFunction(UINT8) MakeRankFunction(INT32) MakeRankFunction(FLOAT32) # 61| # 62| Imaging ImagingRankFilter(Imaging im, int size, int rank) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def127] Pillow-11.3.0/src/libImaging/Resample.c:211:9: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds_horiz’ Pillow-11.3.0/src/libImaging/Resample.c:708:1: enter_function: entry to ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: return_function: returning to ‘ImagingResampleInner’ from ‘precompute_coeffs’ Pillow-11.3.0/src/libImaging/Resample.c:732:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:736:18: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:736:18: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ # 209| // check for overflow # 210| if (outSize > INT_MAX / (ksize * (int)sizeof(double))) { # 211|-> ImagingError_MemoryError(); # 212| return 0; # 213| } Error: GCC_ANALYZER_WARNING: [#def128] Pillow-11.3.0/src/libImaging/Resample.c:217:10: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results Pillow-11.3.0/src/libImaging/Resample.c:708:1: enter_function: entry to ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ # 215| /* coefficient buffer */ # 216| /* malloc check ok, overflow checked above */ # 217|-> kk = malloc(outSize * ksize * sizeof(double)); # 218| if (!kk) { # 219| ImagingError_MemoryError(); Error: GCC_ANALYZER_WARNING (CWE-401): [#def129] Pillow-11.3.0/src/libImaging/Resample.c:219:9: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds_horiz’ Pillow-11.3.0/src/libImaging/Resample.c:708:1: enter_function: entry to ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: return_function: returning to ‘ImagingResampleInner’ from ‘precompute_coeffs’ Pillow-11.3.0/src/libImaging/Resample.c:732:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:736:18: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:736:18: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ # 217| kk = malloc(outSize * ksize * sizeof(double)); # 218| if (!kk) { # 219|-> ImagingError_MemoryError(); # 220| return 0; # 221| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def130] Pillow-11.3.0/src/libImaging/Resample.c:227:9: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds_horiz’ Pillow-11.3.0/src/libImaging/Resample.c:708:1: enter_function: entry to ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: return_function: returning to ‘ImagingResampleInner’ from ‘precompute_coeffs’ Pillow-11.3.0/src/libImaging/Resample.c:732:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:736:18: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:736:18: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ # 225| if (!bounds) { # 226| free(kk); # 227|-> ImagingError_MemoryError(); # 228| return 0; # 229| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def131] Pillow-11.3.0/src/libImaging/Resample.c:248:24: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds_horiz’ Pillow-11.3.0/src/libImaging/Resample.c:708:1: enter_function: entry to ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: return_function: returning to ‘ImagingResampleInner’ from ‘precompute_coeffs’ Pillow-11.3.0/src/libImaging/Resample.c:732:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:736:18: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:736:18: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ # 246| k = &kk[xx * ksize]; # 247| for (x = 0; x < xmax; x++) { # 248|-> double w = filterp->filter((x + xmin - center + 0.5) * ss); # 249| k[x] = w; # 250| ww += w; Error: GCC_ANALYZER_WARNING (CWE-401): [#def132] Pillow-11.3.0/src/libImaging/Resample.c:248:24: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds’ Pillow-11.3.0/src/libImaging/Resample.c:708:1: enter_function: entry to ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ # 246| k = &kk[xx * ksize]; # 247| for (x = 0; x < xmax; x++) { # 248|-> double w = filterp->filter((x + xmin - center + 0.5) * ss); # 249| k[x] = w; # 250| ww += w; Error: GCC_ANALYZER_WARNING (CWE-401): [#def133] Pillow-11.3.0/src/libImaging/Resample.c:248:24: warning[-Wanalyzer-malloc-leak]: leak of ‘kk’ Pillow-11.3.0/src/libImaging/Resample.c:708:1: enter_function: entry to ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ # 246| k = &kk[xx * ksize]; # 247| for (x = 0; x < xmax; x++) { # 248|-> double w = filterp->filter((x + xmin - center + 0.5) * ss); # 249| k[x] = w; # 250| ww += w; Error: GCC_ANALYZER_WARNING (CWE-401): [#def134] Pillow-11.3.0/src/libImaging/Resample.c:482:5: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds_horiz’ Pillow-11.3.0/src/libImaging/Resample.c:646:1: enter_function: entry to ‘ImagingResample’ Pillow-11.3.0/src/libImaging/Resample.c:651:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:655:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:656:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:656:12: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:682:5: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:702:12: call_function: calling ‘ImagingResampleInner’ from ‘ImagingResample’ # 480| } # 481| # 482|-> ImagingSectionEnter(&cookie); # 483| for (yy = 0; yy < imOut->ysize; yy++) { # 484| for (xx = 0; xx < imOut->xsize; xx++) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def135] Pillow-11.3.0/src/libImaging/Resample.c:482:5: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds_vert’ Pillow-11.3.0/src/libImaging/Resample.c:646:1: enter_function: entry to ‘ImagingResample’ Pillow-11.3.0/src/libImaging/Resample.c:651:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:655:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:656:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:656:12: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:682:5: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:702:12: call_function: calling ‘ImagingResampleInner’ from ‘ImagingResample’ # 480| } # 481| # 482|-> ImagingSectionEnter(&cookie); # 483| for (yy = 0; yy < imOut->ysize; yy++) { # 484| for (xx = 0; xx < imOut->xsize; xx++) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def136] Pillow-11.3.0/src/libImaging/Resample.c:500:5: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds_horiz’ Pillow-11.3.0/src/libImaging/Resample.c:646:1: enter_function: entry to ‘ImagingResample’ Pillow-11.3.0/src/libImaging/Resample.c:651:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:655:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:656:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:656:12: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:682:5: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:702:12: call_function: calling ‘ImagingResampleInner’ from ‘ImagingResample’ # 498| } # 499| } # 500|-> ImagingSectionLeave(&cookie); # 501| } # 502| Error: GCC_ANALYZER_WARNING (CWE-401): [#def137] Pillow-11.3.0/src/libImaging/Resample.c:500:5: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds_vert’ Pillow-11.3.0/src/libImaging/Resample.c:646:1: enter_function: entry to ‘ImagingResample’ Pillow-11.3.0/src/libImaging/Resample.c:651:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:655:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:656:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:656:12: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:682:5: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:702:12: call_function: calling ‘ImagingResampleInner’ from ‘ImagingResample’ # 498| } # 499| } # 500|-> ImagingSectionLeave(&cookie); # 501| } # 502| Error: GCC_ANALYZER_WARNING (CWE-401): [#def138] Pillow-11.3.0/src/libImaging/Resample.c:522:5: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds_vert’ Pillow-11.3.0/src/libImaging/Resample.c:646:1: enter_function: entry to ‘ImagingResample’ Pillow-11.3.0/src/libImaging/Resample.c:651:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:655:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:656:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:656:12: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:682:5: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:702:12: call_function: calling ‘ImagingResampleInner’ from ‘ImagingResample’ # 520| } # 521| # 522|-> ImagingSectionEnter(&cookie); # 523| for (yy = 0; yy < imOut->ysize; yy++) { # 524| ymin = bounds[yy * 2 + 0]; Error: GCC_ANALYZER_WARNING (CWE-401): [#def139] Pillow-11.3.0/src/libImaging/Resample.c:539:5: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds_vert’ Pillow-11.3.0/src/libImaging/Resample.c:646:1: enter_function: entry to ‘ImagingResample’ Pillow-11.3.0/src/libImaging/Resample.c:651:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:655:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:656:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:656:12: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:682:5: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:702:12: call_function: calling ‘ImagingResampleInner’ from ‘ImagingResample’ # 537| } # 538| } # 539|-> ImagingSectionLeave(&cookie); # 540| } # 541| Error: GCC_ANALYZER_WARNING (CWE-401): [#def140] Pillow-11.3.0/src/libImaging/Resample.c:757:18: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds_horiz’ Pillow-11.3.0/src/libImaging/Resample.c:708:1: enter_function: entry to ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: return_function: returning to ‘ImagingResampleInner’ from ‘precompute_coeffs’ Pillow-11.3.0/src/libImaging/Resample.c:732:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:736:18: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:736:18: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:736:18: return_function: returning to ‘ImagingResampleInner’ from ‘precompute_coeffs’ Pillow-11.3.0/src/libImaging/Resample.c:739:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:746:18: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:751:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:751:8: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:757:18: throw: if ‘ImagingNewDirty’ throws an exception... Pillow-11.3.0/src/libImaging/Resample.c:757:18: danger: ‘bounds_horiz’ leaks here; was allocated at [(8)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/7) # 755| } # 756| # 757|-> imTemp = ImagingNewDirty(imIn->mode, xsize, ybox_last - ybox_first); # 758| if (imTemp) { # 759| ResampleHorizontal( Error: GCC_ANALYZER_WARNING (CWE-401): [#def141] Pillow-11.3.0/src/libImaging/Resample.c:757:18: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds_vert’ Pillow-11.3.0/src/libImaging/Resample.c:708:1: enter_function: entry to ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: return_function: returning to ‘ImagingResampleInner’ from ‘precompute_coeffs’ Pillow-11.3.0/src/libImaging/Resample.c:732:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:736:18: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:736:18: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:736:18: return_function: returning to ‘ImagingResampleInner’ from ‘precompute_coeffs’ Pillow-11.3.0/src/libImaging/Resample.c:739:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:746:18: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:751:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:751:8: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:757:18: throw: if ‘ImagingNewDirty’ throws an exception... Pillow-11.3.0/src/libImaging/Resample.c:757:18: danger: ‘bounds_vert’ leaks here; was allocated at [(19)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/18) # 755| } # 756| # 757|-> imTemp = ImagingNewDirty(imIn->mode, xsize, ybox_last - ybox_first); # 758| if (imTemp) { # 759| ResampleHorizontal( Error: GCC_ANALYZER_WARNING (CWE-401): [#def142] Pillow-11.3.0/src/libImaging/Resample.c:759:13: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds_horiz’ Pillow-11.3.0/src/libImaging/Resample.c:708:1: enter_function: entry to ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: return_function: returning to ‘ImagingResampleInner’ from ‘precompute_coeffs’ Pillow-11.3.0/src/libImaging/Resample.c:732:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:736:18: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:736:18: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:736:18: return_function: returning to ‘ImagingResampleInner’ from ‘precompute_coeffs’ Pillow-11.3.0/src/libImaging/Resample.c:739:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:746:18: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:751:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:751:8: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:758:12: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:759:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:759:13: throw: if the called function throws an exception... Pillow-11.3.0/src/libImaging/Resample.c:759:13: danger: ‘bounds_horiz’ leaks here; was allocated at [(8)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/7) # 757| imTemp = ImagingNewDirty(imIn->mode, xsize, ybox_last - ybox_first); # 758| if (imTemp) { # 759|-> ResampleHorizontal( # 760| imTemp, imIn, ybox_first, ksize_horiz, bounds_horiz, kk_horiz # 761| ); Error: GCC_ANALYZER_WARNING (CWE-401): [#def143] Pillow-11.3.0/src/libImaging/Resample.c:759:13: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds_vert’ Pillow-11.3.0/src/libImaging/Resample.c:708:1: enter_function: entry to ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: return_function: returning to ‘ImagingResampleInner’ from ‘precompute_coeffs’ Pillow-11.3.0/src/libImaging/Resample.c:732:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:736:18: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:736:18: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:736:18: return_function: returning to ‘ImagingResampleInner’ from ‘precompute_coeffs’ Pillow-11.3.0/src/libImaging/Resample.c:739:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:746:18: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:751:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:751:8: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:758:12: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:759:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:759:13: throw: if the called function throws an exception... Pillow-11.3.0/src/libImaging/Resample.c:759:13: danger: ‘bounds_vert’ leaks here; was allocated at [(19)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/18) # 757| imTemp = ImagingNewDirty(imIn->mode, xsize, ybox_last - ybox_first); # 758| if (imTemp) { # 759|-> ResampleHorizontal( # 760| imTemp, imIn, ybox_first, ksize_horiz, bounds_horiz, kk_horiz # 761| ); Error: GCC_ANALYZER_WARNING (CWE-401): [#def144] Pillow-11.3.0/src/libImaging/Resample.c:779:17: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds_vert’ Pillow-11.3.0/src/libImaging/Resample.c:708:1: enter_function: entry to ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: return_function: returning to ‘ImagingResampleInner’ from ‘precompute_coeffs’ Pillow-11.3.0/src/libImaging/Resample.c:732:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:736:18: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:736:18: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:736:18: return_function: returning to ‘ImagingResampleInner’ from ‘precompute_coeffs’ Pillow-11.3.0/src/libImaging/Resample.c:739:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:746:18: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:751:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:773:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:778:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:779:17: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:779:17: throw: if ‘ImagingNewDirty’ throws an exception... Pillow-11.3.0/src/libImaging/Resample.c:779:17: danger: ‘bounds_vert’ leaks here; was allocated at [(19)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/18) # 777| /* vertical pass */ # 778| if (need_vertical) { # 779|-> imOut = ImagingNewDirty(imIn->mode, imIn->xsize, ysize); # 780| if (imOut) { # 781| /* imIn can be the original image or horizontally resampled one */ Error: GCC_ANALYZER_WARNING (CWE-401): [#def145] Pillow-11.3.0/src/libImaging/Resample.c:782:13: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds_vert’ Pillow-11.3.0/src/libImaging/Resample.c:708:1: enter_function: entry to ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: return_function: returning to ‘ImagingResampleInner’ from ‘precompute_coeffs’ Pillow-11.3.0/src/libImaging/Resample.c:732:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:736:18: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:736:18: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:736:18: return_function: returning to ‘ImagingResampleInner’ from ‘precompute_coeffs’ Pillow-11.3.0/src/libImaging/Resample.c:739:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:746:18: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:751:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:773:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:778:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:779:17: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:780:12: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:782:13: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:782:13: throw: if the called function throws an exception... Pillow-11.3.0/src/libImaging/Resample.c:782:13: danger: ‘bounds_vert’ leaks here; was allocated at [(19)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/18) # 780| if (imOut) { # 781| /* imIn can be the original image or horizontally resampled one */ # 782|-> ResampleVertical(imOut, imIn, 0, ksize_vert, bounds_vert, kk_vert); # 783| } # 784| /* it's safe to call ImagingDelete with empty value Error: GCC_ANALYZER_WARNING (CWE-401): [#def146] Pillow-11.3.0/src/libImaging/Resample.c:786:9: warning[-Wanalyzer-malloc-leak]: leak of ‘bounds_vert’ Pillow-11.3.0/src/libImaging/Resample.c:708:1: enter_function: entry to ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:729:19: return_function: returning to ‘ImagingResampleInner’ from ‘precompute_coeffs’ Pillow-11.3.0/src/libImaging/Resample.c:732:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:736:18: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:736:18: call_function: calling ‘precompute_coeffs’ from ‘ImagingResampleInner’ Pillow-11.3.0/src/libImaging/Resample.c:736:18: return_function: returning to ‘ImagingResampleInner’ from ‘precompute_coeffs’ Pillow-11.3.0/src/libImaging/Resample.c:739:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:746:18: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:751:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:773:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:778:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/libImaging/Resample.c:779:17: branch_true: ...to here Pillow-11.3.0/src/libImaging/Resample.c:780:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Resample.c:786:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/Resample.c:786:9: throw: if ‘ImagingDelete’ throws an exception... Pillow-11.3.0/src/libImaging/Resample.c:786:9: danger: ‘bounds_vert’ leaks here; was allocated at [(19)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/18) # 784| /* it's safe to call ImagingDelete with empty value # 785| if previous step was not performed. */ # 786|-> ImagingDelete(imTemp); # 787| free(bounds_vert); # 788| free(kk_vert); Error: GCC_ANALYZER_WARNING (CWE-401): [#def147] Pillow-11.3.0/src/libImaging/SgiRleDecode.c:196:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’ Pillow-11.3.0/src/libImaging/SgiRleDecode.c:170:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:186:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:191:11: branch_false: ...to here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:191:11: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:192:8: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:196:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:196:5: throw: if ‘_imaging_seek_pyFd’ throws an exception... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:196:5: danger: ‘ptr’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4) # 194| return -1; # 195| } # 196|-> _imaging_seek_pyFd(state->fd, SGI_HEADER_SIZE, SEEK_SET); # 197| if (_imaging_read_pyFd(state->fd, (char *)ptr, c->bufsize) != c->bufsize) { # 198| free(ptr); Error: GCC_ANALYZER_WARNING (CWE-401): [#def148] Pillow-11.3.0/src/libImaging/SgiRleDecode.c:197:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’ Pillow-11.3.0/src/libImaging/SgiRleDecode.c:170:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:186:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:191:11: branch_false: ...to here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:191:11: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:192:8: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:196:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:197:9: throw: if ‘_imaging_read_pyFd’ throws an exception... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:197:9: danger: ‘ptr’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4) # 195| } # 196| _imaging_seek_pyFd(state->fd, SGI_HEADER_SIZE, SEEK_SET); # 197|-> if (_imaging_read_pyFd(state->fd, (char *)ptr, c->bufsize) != c->bufsize) { # 198| free(ptr); # 199| state->errcode = IMAGING_CODEC_UNKNOWN; Error: GCC_ANALYZER_WARNING (CWE-401): [#def149] Pillow-11.3.0/src/libImaging/SgiRleDecode.c:219:8: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc((long unsigned int)*c.tablen, 4)’ Pillow-11.3.0/src/libImaging/SgiRleDecode.c:170:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:186:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:191:11: branch_false: ...to here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:192:8: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:196:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:197:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:204:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:217:19: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:219:8: danger: ‘calloc((long unsigned int)*c.tablen, 4)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8) # 217| c->starttab = calloc(c->tablen, sizeof(UINT32)); # 218| c->lengthtab = calloc(c->tablen, sizeof(UINT32)); # 219|-> if (!state->buffer || !c->starttab || !c->lengthtab) { # 220| err = IMAGING_CODEC_MEMORY; # 221| goto sgi_finish_decode; Error: GCC_ANALYZER_WARNING (CWE-401): [#def150] Pillow-11.3.0/src/libImaging/SgiRleDecode.c:219:9: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc((long unsigned int)*c.tablen, 4)’ Pillow-11.3.0/src/libImaging/SgiRleDecode.c:170:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:186:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:191:11: branch_false: ...to here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:192:8: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:196:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:197:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:204:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:218:20: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:219:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:219:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:219:9: danger: ‘calloc((long unsigned int)*c.tablen, 4)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8) # 217| c->starttab = calloc(c->tablen, sizeof(UINT32)); # 218| c->lengthtab = calloc(c->tablen, sizeof(UINT32)); # 219|-> if (!state->buffer || !c->starttab || !c->lengthtab) { # 220| err = IMAGING_CODEC_MEMORY; # 221| goto sgi_finish_decode; Error: GCC_ANALYZER_WARNING (CWE-401): [#def151] Pillow-11.3.0/src/libImaging/SgiRleDecode.c:219:9: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc((long unsigned int)*c.tablen, 4)’ Pillow-11.3.0/src/libImaging/SgiRleDecode.c:170:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:186:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:191:11: branch_false: ...to here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:192:8: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:196:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:197:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:204:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:217:19: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:219:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:219:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:219:9: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:219:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:219:9: danger: ‘calloc((long unsigned int)*c.tablen, 4)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8) # 217| c->starttab = calloc(c->tablen, sizeof(UINT32)); # 218| c->lengthtab = calloc(c->tablen, sizeof(UINT32)); # 219|-> if (!state->buffer || !c->starttab || !c->lengthtab) { # 220| err = IMAGING_CODEC_MEMORY; # 221| goto sgi_finish_decode; Error: GCC_ANALYZER_WARNING (CWE-401): [#def152] Pillow-11.3.0/src/libImaging/SgiRleDecode.c:224:44: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc((long unsigned int)*c.tablen, 4)’ Pillow-11.3.0/src/libImaging/SgiRleDecode.c:170:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:186:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:191:11: branch_false: ...to here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:192:8: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:196:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:197:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:204:5: branch_false: ...to here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:217:19: acquire_memory: allocated here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:219:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:219:9: branch_false: ...to here Pillow-11.3.0/src/libImaging/SgiRleDecode.c:219:9: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/SgiRleDecode.c:224:44: danger: ‘calloc((long unsigned int)*c.tablen, 4)’ leaks here; was allocated at [(9)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/8) # 222| } # 223| /* populate offsets table */ # 224|-> for (c->tabindex = 0, c->bufindex = 0; c->tabindex < c->tablen; # 225| c->tabindex++, c->bufindex += 4) { # 226| read4B(&c->starttab[c->tabindex], &ptr[c->bufindex]); Error: GCC_ANALYZER_WARNING (CWE-401): [#def153] Pillow-11.3.0/src/libImaging/Storage.c:75:23: warning[-Wanalyzer-malloc-leak]: leak of ‘im’ Pillow-11.3.0/src/libImaging/Storage.c:627:1: enter_function: entry to ‘ImagingNewInternal’ Pillow-11.3.0/src/libImaging/Storage.c:634:10: call_function: calling ‘ImagingNewPrologue’ from ‘ImagingNewInternal’ # 73| im->bands = im->pixelsize = 1; # 74| im->linesize = xsize; # 75|-> im->palette = ImagingPaletteNew("RGB"); # 76| strcpy(im->band_names[0], "P"); # 77| Error: GCC_ANALYZER_WARNING (CWE-401): [#def154] Pillow-11.3.0/src/libImaging/Storage.c:83:23: warning[-Wanalyzer-malloc-leak]: leak of ‘im’ Pillow-11.3.0/src/libImaging/Storage.c:627:1: enter_function: entry to ‘ImagingNewInternal’ Pillow-11.3.0/src/libImaging/Storage.c:634:10: call_function: calling ‘ImagingNewPrologue’ from ‘ImagingNewInternal’ # 81| im->pixelsize = 4; /* store in image32 memory */ # 82| im->linesize = xsize * 4; # 83|-> im->palette = ImagingPaletteNew("RGB"); # 84| strcpy(im->band_names[0], "P"); # 85| strcpy(im->band_names[1], "X"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def155] Pillow-11.3.0/src/libImaging/Storage.c:291:12: warning[-Wanalyzer-malloc-leak]: leak of ‘block.ptr’ Pillow-11.3.0/src/libImaging/Storage.c:627:1: enter_function: entry to ‘ImagingNewInternal’ Pillow-11.3.0/src/libImaging/Storage.c:635:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Storage.c:640:19: branch_false: ...to here Pillow-11.3.0/src/libImaging/Storage.c:640:19: call_function: calling ‘ImagingAllocateArray’ from ‘ImagingNewInternal’ # 289| Imaging # 290| ImagingNewPrologue(const char *mode, int xsize, int ysize) { # 291|-> return ImagingNewPrologueSubtype( # 292| mode, xsize, ysize, sizeof(struct ImagingMemoryInstance) # 293| ); Error: GCC_ANALYZER_WARNING (CWE-401): [#def156] Pillow-11.3.0/src/libImaging/Storage.c:442:1: warning[-Wanalyzer-malloc-leak]: leak of ‘block.ptr’ Pillow-11.3.0/src/libImaging/Storage.c:627:1: enter_function: entry to ‘ImagingNewInternal’ Pillow-11.3.0/src/libImaging/Storage.c:635:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/libImaging/Storage.c:640:19: branch_false: ...to here Pillow-11.3.0/src/libImaging/Storage.c:640:19: call_function: calling ‘ImagingAllocateArray’ from ‘ImagingNewInternal’ # 440| arena->stats_freed_blocks += 1; # 441| } # 442|-> } # 443| # 444| static void Error: GCC_ANALYZER_WARNING (CWE-404): [#def157] Pillow-11.3.0/src/libImaging/TiffDecode.c:928:14: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’ Pillow-11.3.0/src/libImaging/TiffDecode.c:927:5: acquire_resource: ‘va_start’ called here Pillow-11.3.0/src/libImaging/TiffDecode.c:928:14: throw: if ‘TIFFVSetField’ throws an exception... Pillow-11.3.0/src/libImaging/TiffDecode.c:928:14: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 926| # 927| va_start(ap, tag); # 928|-> status = TIFFVSetField(clientstate->tiff, tag, ap); # 929| va_end(ap); # 930| return status; Error: GCC_ANALYZER_WARNING (CWE-401): [#def158] Pillow-11.3.0/src/path.c:58:9: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_array(PyObject_Size(data))’ Pillow-11.3.0/src/path.c:261:1: enter_function: entry to ‘PyPath_Create’ Pillow-11.3.0/src/path.c:266:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/path.c:275:9: branch_false: ...to here Pillow-11.3.0/src/path.c:276:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/path.c:280:17: branch_false: ...to here Pillow-11.3.0/src/path.c:280:17: call_function: calling ‘PyPath_Flatten’ from ‘PyPath_Create’ # 56| return ImagingError_MemoryError(); # 57| } # 58|-> if ((unsigned long long)count > (SIZE_MAX / (2 * sizeof(double))) - 1) { # 59| return ImagingError_MemoryError(); # 60| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def159] Pillow-11.3.0/src/path.c:61:17: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_array(0)’ Pillow-11.3.0/src/path.c:572:1: enter_function: entry to ‘path_subscript’ Pillow-11.3.0/src/path.c:573:8: branch_false: following ‘false’ branch... Pillow-11.3.0/src/path.c:581:9: call_function: inlined call to ‘Py_IS_TYPE’ from ‘path_subscript’ Pillow-11.3.0/src/path.c:581:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/path.c:585:13: branch_true: ...to here Pillow-11.3.0/src/path.c:585:13: branch_false: following ‘false’ branch... Pillow-11.3.0/src/path.c:585:13: branch_false: ...to here Pillow-11.3.0/src/path.c:589:12: branch_true: following ‘true’ branch... Pillow-11.3.0/src/path.c:590:26: call_function: inlined call to ‘alloc_array’ from ‘path_subscript’ Pillow-11.3.0/src/path.c:590:26: call_function: inlined call to ‘alloc_array’ from ‘path_subscript’ Pillow-11.3.0/src/path.c:591:32: call_function: calling ‘path_new’ from ‘path_subscript’ # 59| return ImagingError_MemoryError(); # 60| } # 61|-> xy = calloc(2 * count + 1, sizeof(double)); # 62| if (!xy) { # 63| ImagingError_MemoryError(); Error: GCC_ANALYZER_WARNING (CWE-401): [#def160] Pillow-11.3.0/src/path.c:82:9: warning[-Wanalyzer-malloc-leak]: leak of ‘xy’ Pillow-11.3.0/src/path.c:261:1: enter_function: entry to ‘PyPath_Create’ Pillow-11.3.0/src/path.c:266:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/path.c:268:14: branch_true: ...to here Pillow-11.3.0/src/path.c:268:14: call_function: calling ‘alloc_array’ from ‘PyPath_Create’ Pillow-11.3.0/src/path.c:268:14: return_function: returning to ‘PyPath_Create’ from ‘alloc_array’ Pillow-11.3.0/src/path.c:269:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/path.c:286:24: branch_false: ...to here Pillow-11.3.0/src/path.c:286:24: call_function: calling ‘path_new’ from ‘PyPath_Create’ # 80| } # 81| # 82|-> if (PyType_Ready(&PyPathType) < 0) { # 83| free(xy); # 84| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def161] Pillow-11.3.0/src/path.c:87:12: warning[-Wanalyzer-malloc-leak]: leak of ‘xy’ Pillow-11.3.0/src/path.c:261:1: enter_function: entry to ‘PyPath_Create’ Pillow-11.3.0/src/path.c:266:8: branch_true: following ‘true’ branch... Pillow-11.3.0/src/path.c:268:14: branch_true: ...to here Pillow-11.3.0/src/path.c:268:14: call_function: calling ‘alloc_array’ from ‘PyPath_Create’ Pillow-11.3.0/src/path.c:268:14: return_function: returning to ‘PyPath_Create’ from ‘alloc_array’ Pillow-11.3.0/src/path.c:269:12: branch_false: following ‘false’ branch... Pillow-11.3.0/src/path.c:286:24: branch_false: ...to here Pillow-11.3.0/src/path.c:286:24: call_function: calling ‘path_new’ from ‘PyPath_Create’ # 85| } # 86| # 87|-> path = PyObject_New(PyPathObject, &PyPathType); # 88| if (path == NULL) { # 89| free(xy);
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.0 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-38.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | python-pillow-11.3.0-6.fc43 |
| store-results-to | /tmp/tmpdy0jhgsi/python-pillow-11.3.0-6.fc43.tar.xz |
| time-created | 2026-01-08 20:50:10 |
| time-finished | 2026-01-08 20:54:43 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpdy0jhgsi/python-pillow-11.3.0-6.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpdy0jhgsi/python-pillow-11.3.0-6.fc43.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |