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
7e1b8faa
Commit
7e1b8faa
authored
Nov 26, 2008
by
Matthias Klose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fix build failure of _cursesmodule.c building with -D_FORTIFY_SOURCE=2.
parent
1ff110d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
Misc/NEWS
Misc/NEWS
+2
-0
Modules/_cursesmodule.c
Modules/_cursesmodule.c
+8
-1
No files found.
Misc/NEWS
View file @
7e1b8faa
...
@@ -19,6 +19,8 @@ Core and Builtins
...
@@ -19,6 +19,8 @@ Core and Builtins
- Issue #4367: Python would segfault during compiling when the unicodedata
- Issue #4367: Python would segfault during compiling when the unicodedata
module couldn't be imported and \N escapes were present.
module couldn't be imported and \N escapes were present.
- Fix build failure of _cursesmodule.c building with -D_FORTIFY_SOURCE=2.
Library
Library
-------
-------
...
...
Modules/_cursesmodule.c
View file @
7e1b8faa
...
@@ -1857,6 +1857,7 @@ PyCurses_GetWin(PyCursesWindowObject *self, PyObject *stream)
...
@@ -1857,6 +1857,7 @@ PyCurses_GetWin(PyCursesWindowObject *self, PyObject *stream)
int
fd
;
int
fd
;
FILE
*
fp
;
FILE
*
fp
;
PyObject
*
data
;
PyObject
*
data
;
size_t
datalen
;
WINDOW
*
win
;
WINDOW
*
win
;
PyCursesInitialised
PyCursesInitialised
...
@@ -1886,7 +1887,13 @@ PyCurses_GetWin(PyCursesWindowObject *self, PyObject *stream)
...
@@ -1886,7 +1887,13 @@ PyCurses_GetWin(PyCursesWindowObject *self, PyObject *stream)
remove
(
fn
);
remove
(
fn
);
return
NULL
;
return
NULL
;
}
}
fwrite
(
PyBytes_AS_STRING
(
data
),
1
,
PyBytes_GET_SIZE
(
data
),
fp
);
datalen
=
PyBytes_GET_SIZE
(
data
);
if
(
fwrite
(
PyBytes_AS_STRING
(
data
),
1
,
datalen
,
fp
)
!=
datalen
)
{
Py_DECREF
(
data
);
fclose
(
fp
);
remove
(
fn
);
return
PyErr_SetFromErrnoWithFilename
(
PyExc_IOError
,
fn
);
}
Py_DECREF
(
data
);
Py_DECREF
(
data
);
fseek
(
fp
,
0
,
0
);
fseek
(
fp
,
0
,
0
);
win
=
getwin
(
fp
);
win
=
getwin
(
fp
);
...
...
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