We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2137d12 commit fecfe17Copy full SHA for fecfe17
Python/marshal.c
@@ -1480,7 +1480,11 @@ r_object(RFILE *p)
1480
struct _PyCodeConstructor con = { 0 }; // All zeros
1481
Py_ssize_t first_ref = -1;
1482
1483
- assert(flag == 0); // We don't handle references to code objects
+ if (flag != 0) {
1484
+ PyErr_BadArgument();
1485
+ return NULL;
1486
+ }
1487
+
1488
v = NULL;
1489
1490
/* XXX ignore long->int overflows for now */
@@ -2073,6 +2077,7 @@ _PyCode_Hydrate(PyCodeObject *code)
2073
2077
2074
2078
PyObject *result = read_object(&rf);
2075
2079
Py_XDECREF(rf.refs);
2080
+ assert(result == NULL || code->co_hydra_context == NULL);
2076
2081
Py_XDECREF(code->co_hydra_context);
2082
code->co_hydra_context = NULL;
2083
Py_XDECREF(ctx->code);
0 commit comments