This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steve.dower
Recipients Arfrever, cheryl.sabella, maker, neologix, pitrou, serhiy.storchaka, steve.dower, vstinner
Date 2019-04-22.19:06:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1555959965.91.0.614538764629.issue18564@roundup.psfhosted.org>
In-reply-to
Content
According to a couple of scanf docs I found, the '%x' format expects to write into unsigned int*, just as we already do. So it shouldn't be possible to overflow there.

The following line (or-ing all the values and checking that it's less than 256) handles the overflow already.

Limiting each %x specifier to two characters has exactly the same effect, and could potentially fix overflow errors in C runtimes that assume a larger destination without the data size prefix ('%zx' or '%llx'), but I don't know of any of those.

All that said, I'm not opposed to adding the tests. If the parsing logic is a sticking point, then that can be undone, but I think it's also okay.
History
Date User Action Args
2019-04-22 19:06:05steve.dowersetrecipients: + steve.dower, pitrou, vstinner, Arfrever, neologix, maker, serhiy.storchaka, cheryl.sabella
2019-04-22 19:06:05steve.dowersetmessageid: <1555959965.91.0.614538764629.issue18564@roundup.psfhosted.org>
2019-04-22 19:06:05steve.dowerlinkissue18564 messages
2019-04-22 19:06:05steve.dowercreate