Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
01f519d7
Commit
01f519d7
authored
Sep 06, 2015
by
Steve Dower
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #24917: time_strftime() buffer over-read.
parent
10679e34
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
Misc/NEWS
Misc/NEWS
+2
-0
Modules/timemodule.c
Modules/timemodule.c
+2
-0
No files found.
Misc/NEWS
View file @
01f519d7
...
@@ -81,6 +81,8 @@ Core and Builtins
...
@@ -81,6 +81,8 @@ Core and Builtins
Library
Library
-------
-------
-
Issue
#
24917
:
time_strftime
()
buffer
over
-
read
.
-
Issue
#
23144
:
Make
sure
that
HTMLParser
.
feed
()
returns
all
the
data
,
even
-
Issue
#
23144
:
Make
sure
that
HTMLParser
.
feed
()
returns
all
the
data
,
even
when
convert_charrefs
is
True
.
when
convert_charrefs
is
True
.
...
...
Modules/timemodule.c
View file @
01f519d7
...
@@ -655,6 +655,8 @@ time_strftime(PyObject *self, PyObject *args)
...
@@ -655,6 +655,8 @@ time_strftime(PyObject *self, PyObject *args)
outbuf
!=
NULL
;
outbuf
!=
NULL
;
outbuf
=
wcschr
(
outbuf
+
2
,
'%'
))
outbuf
=
wcschr
(
outbuf
+
2
,
'%'
))
{
{
if
(
outbuf
[
1
]
==
L'\0'
)
break
;
/* Issue #19634: On AIX, wcsftime("y", (1899, 1, 1, 0, 0, 0, 0, 0, 0))
/* Issue #19634: On AIX, wcsftime("y", (1899, 1, 1, 0, 0, 0, 0, 0, 0))
returns "0/" instead of "99" */
returns "0/" instead of "99" */
if
(
outbuf
[
1
]
==
L'y'
&&
buf
.
tm_year
<
0
)
{
if
(
outbuf
[
1
]
==
L'y'
&&
buf
.
tm_year
<
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment