-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak in function fname2char
due to new reference is not decreased (static analyzer report)
#6319
Comments
Would you mind providing some detail on how you ran the static analyzer? What tool did you use specifically? |
It is an experimental analyzer of my unpublished research, which is developed on the top of the clang static analyzer. |
|
I agree with this comment. It will lead to a UaF bug if the refcnt is decreased. However, it is also a fact that the PyObject is definitely leaked. Maybe a better solution is required. Such as copying the content of the string into a temporary buffer, or just returning the PyObject directly, and using the getter function at the places where the content is used. |
fname2char
due to new reference is not decreased (static analyzer report)fname2char
due to new reference is not decreased (static analyzer report)
A new reference is returned and assigned to
bytes
.Pillow/src/Tk/tkImaging.c
Line 371 in 68e39cb
Function returns without decreasing the refcnt of
bytes
.Pillow/src/Tk/tkImaging.c
Line 375 in 68e39cb
Internal Report ID: c6d448
The text was updated successfully, but these errors were encountered: