-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
Closed
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
#106411 adds the _PyCompile_CleanDoc function.
there's a call to PyMem_Malloc, but we don't check if it returns NULL value:
Lines 8055 to 8063 in 009e8f0
| char *buff = PyMem_Malloc(doc_size); | |
| char *w = buff; | |
| while (p < pend) { | |
| int ch = *w++ = *p++; | |
| if (ch == '\n') { | |
| break; | |
| } | |
| } |
Is there a need to check for a NULL value?
If so, I can send a PR.
Linked PRs
Metadata
Metadata
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error