Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4ff470 commit 4b24a42Copy full SHA for 4b24a42
1 file changed
Objects/bytesobject.c
@@ -2932,6 +2932,11 @@ PyBytes_FromObject(PyObject *x)
2932
PyObject *new, *it;
2933
Py_ssize_t i, size;
2934
2935
+ if (x == NULL) {
2936
+ PyErr_BadInternalCall();
2937
+ return NULL;
2938
+ }
2939
+
2940
/* Is it an int? */
2941
size = PyNumber_AsSsize_t(x, PyExc_ValueError);
2942
if (size == -1 && PyErr_Occurred()) {
0 commit comments