Fixed findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
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): [#def2]
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): [#def3]
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): [#def4]
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): [#def5]
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): [#def6]
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): [#def7]
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): [#def8]
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): [#def9]
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): [#def10]
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): [#def11]
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): [#def12]
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): [#def13]
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): [#def14]
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-416): [#def15]
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: GCC_ANALYZER_WARNING (CWE-476): [#def16]
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-401): [#def17]
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): [#def18]
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): [#def19]
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): [#def20]
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|       );

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.92.0
diffbase-analyzer-version-cppcheck2.19.1
diffbase-analyzer-version-gcc16.0.0
diffbase-analyzer-version-gcc-analyzer16.0.0
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-38.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namepython-pillow-12.1.0-1.fc44
diffbase-store-results-to/tmp/tmpl6ekvhco/python-pillow-12.1.0-1.fc44.tar.xz
diffbase-time-created2026-01-08 20:55:17
diffbase-time-finished2026-01-08 20:58:58
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpl6ekvhco/python-pillow-12.1.0-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpl6ekvhco/python-pillow-12.1.0-1.fc44.src.rpm'
diffbase-tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-38.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namepython-pillow-11.3.0-6.fc43
store-results-to/tmp/tmpdy0jhgsi/python-pillow-11.3.0-6.fc43.tar.xz
time-created2026-01-08 20:50:10
time-finished2026-01-08 20:54:43
titleFixed findings
toolcsmock
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-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9