Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix a possible null pointer dereference in bytesobject.c. Patch by Zackery
Spytz.
2 changes: 1 addition & 1 deletion Objects/bytesobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ formatfloat(PyObject *v, int flags, int prec, int type,
result = PyBytes_FromStringAndSize(p, len);
PyMem_Free(p);
*p_result = result;
return str;
return result != NULL ? str : NULL;
}

static PyObject *
Expand Down