mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
dump(): Added asserts that self->proto is sane.
This commit is contained in:
@@ -2217,7 +2217,8 @@ dump(Picklerobject *self, PyObject *args)
|
||||
char bytes[2];
|
||||
|
||||
bytes[0] = PROTO;
|
||||
bytes[1] = self->proto;
|
||||
assert(self->proto >= 0 && self->proto < 256);
|
||||
bytes[1] = (char)self->proto;
|
||||
if (self->write_func(self, bytes, 2) < 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user