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
350147b5
Commit
350147b5
authored
Oct 16, 2010
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
_Py_wreadlink(): catch _Py_char2wchar() failure
parent
3f711f4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
Python/fileutils.c
Python/fileutils.c
+4
-0
No files found.
Python/fileutils.c
View file @
350147b5
...
@@ -326,6 +326,10 @@ _Py_wreadlink(const wchar_t *path, wchar_t *buf, size_t bufsiz)
...
@@ -326,6 +326,10 @@ _Py_wreadlink(const wchar_t *path, wchar_t *buf, size_t bufsiz)
}
}
cbuf
[
res
]
=
'\0'
;
/* buf will be null terminated */
cbuf
[
res
]
=
'\0'
;
/* buf will be null terminated */
wbuf
=
_Py_char2wchar
(
cbuf
);
wbuf
=
_Py_char2wchar
(
cbuf
);
if
(
wbuf
==
NULL
)
{
errno
=
EINVAL
;
return
-
1
;
}
r1
=
wcslen
(
wbuf
);
r1
=
wcslen
(
wbuf
);
if
(
bufsiz
<=
r1
)
{
if
(
bufsiz
<=
r1
)
{
PyMem_Free
(
wbuf
);
PyMem_Free
(
wbuf
);
...
...
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