Pickletools doesn't error on EXT4
negative argument
#127045
Labels
type-bug
An unexpected behavior, bug, or error
EXT4
negative argument
#127045
Bug report
Bug description:
All extension codes must be positive (enforced when using
copyreg.add_extension
and in bothpickle.py
and_pickle.c
implementations), but pickletools doesn't throw an error ifEXT4
has a negative argument.I can make a pull request to change the argument from
int4
touint4
, but that means pickletools accepts extension codes that are0x7fffffff
or higher, whilepickle.py
and_pickle.c
don't. I could also change those modules so they process the 4 bytes as unsigned also, if no one has any objections to that.CPython versions tested on:
3.11
Operating systems tested on:
Linux
The text was updated successfully, but these errors were encountered: