Files
gentoo/dev-python/cbor/files/cbor-1.0.0.zero-length-bytes.patch
Brian Dolbec 3074eb67b6 dev-python/cbor: Fix test failure bug 719648
Adds trivial patches to main code, fixes test_cbor.py test_sortkeys()
wrongly assuming dictionary keys may not always be sorted when added
in sorted order.
Fix the test phase not finding the c extension module.
Update metadata.xml to github repo.

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
2020-07-19 18:52:01 -07:00

11 lines
361 B
Diff

--- a/cbor/cbor.py 2020-07-19 13:24:39.497775767 -0700
+++ b/cbor/cbor.py 2020-07-19 13:24:39.497775767 -0700
@@ -260,6 +260,8 @@
"""
if data is None:
raise ValueError("got None for buffer to decode in loads")
+ elif data == b'':
+ raise ValueError("got zero length string loads")
fp = StringIO(data)
return _loads(fp)[0]