Message340676
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. |
|
Date |
User |
Action |
Args |
2019-04-22 19:06:05 | steve.dower | set | recipients:
+ steve.dower, pitrou, vstinner, Arfrever, neologix, maker, serhiy.storchaka, cheryl.sabella |
2019-04-22 19:06:05 | steve.dower | set | messageid: <1555959965.91.0.614538764629.issue18564@roundup.psfhosted.org> |
2019-04-22 19:06:05 | steve.dower | link | issue18564 messages |
2019-04-22 19:06:05 | steve.dower | create | |
|