Message250031
How's this for the test (I added an explanatory comment, since it may look like it isn't testing anything to someone who isn't familiar with the issue):
def test_strftime_format_check(self):
# Test that strftime does not crash on invalid format strings
# that may trigger a buffer overread. When not triggered,
# strftime may succeed or raise ValueError depending on
# the platform.
for x in [ '', 'A', '%A', '%AA' ]:
for y in range(0x0, 0x10):
for z in [ '%', 'A%', 'AA%', '%A%', 'A%A%', '%#' ]:
try:
time.strftime(x * y + z)
except ValueError:
pass |
|
Date |
User |
Action |
Args |
2015-09-06 23:14:22 | steve.dower | set | recipients:
+ steve.dower, lemburg, georg.brandl, paul.moore, belopolsky, vstinner, larry, tim.golden, BreamoreBoy, python-dev, zach.ware, eryksun, JohnLeitch, brycedarling |
2015-09-06 23:14:22 | steve.dower | set | messageid: <1441581262.51.0.90226017602.issue24917@psf.upfronthosting.co.za> |
2015-09-06 23:14:22 | steve.dower | link | issue24917 messages |
2015-09-06 23:14:22 | steve.dower | create | |
|