]> granicus.if.org Git - python/commit
bpo-31339: Rewrite time.asctime() and time.ctime() (#3293)
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 5 Sep 2017 23:35:39 +0000 (01:35 +0200)
committerGitHub <noreply@github.com>
Tue, 5 Sep 2017 23:35:39 +0000 (01:35 +0200)
commiteeadf5fc231163ec97a8010754d9c995c7c14876
treeafe81189ae2a1e087dbbee68b67d63e5066c6697
parent8905fb831cf7c400c479b79bb2f90bfbe9c71337
bpo-31339: Rewrite time.asctime() and time.ctime() (#3293)

* bpo-31339: Rewrite time.asctime() and time.ctime()

Backport and adapt the _asctime() function from the master branch to
not depend on the implementation of asctime() and ctime() from the
external C library. This change fixes a bug when Python is run using
the musl C library.

* bound checks for time.asctime()

* bound checks for time.strftime()
Lib/test/test_time.py
Misc/NEWS.d/next/Security/2017-09-04-21-24-51.bpo-31339.YSczZN.rst [new file with mode: 0644]
Modules/timemodule.c