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
aa6111fc
Commit
aa6111fc
authored
Jul 31, 2001
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add mysnprintf.c to Windows build, + squash compiler wngs in mysnprintf.c.
parent
03d1b181
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
PCbuild/pythoncore.dsp
PCbuild/pythoncore.dsp
+15
-0
Python/mysnprintf.c
Python/mysnprintf.c
+3
-2
No files found.
PCbuild/pythoncore.dsp
View file @
aa6111fc
...
...
@@ -1163,6 +1163,21 @@ SOURCE=..\Parser\myreadline.c
# End Source File
# Begin Source File
SOURCE=..\Python\mysnprintf.c
!IF "$(CFG)" == "pythoncore - Win32 Release"
!ELSEIF "$(CFG)" == "pythoncore - Win32 Debug"
!ELSEIF "$(CFG)" == "pythoncore - Win32 Alpha Debug"
!ELSEIF "$(CFG)" == "pythoncore - Win32 Alpha Release"
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\Python\mystrtoul.c
!IF "$(CFG)" == "pythoncore - Win32 Release"
...
...
Python/mysnprintf.c
View file @
aa6111fc
...
...
@@ -37,9 +37,10 @@ int myvsnprintf(char *str, size_t size, const char *format, va_list va)
return
len
;
}
len
++
;
if
(
len
>
size
+
512
)
assert
(
len
>=
0
);
if
((
size_t
)
len
>
size
+
512
)
Py_FatalError
(
"Buffer overflow in PyOS_snprintf/PyOS_vsnprintf"
);
if
(
len
>
size
)
{
if
(
(
size_t
)
len
>
size
)
{
PyMem_Free
(
buffer
);
return
len
-
1
;
}
...
...
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