projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e7d51b
)
Applied patch for [ 1047269 ] Buffer overwrite in PyUnicode_AsWideChar.
author
Marc-André Lemburg
<mal@egenix.com>
Fri, 15 Oct 2004 07:45:05 +0000
(07:45 +0000)
committer
Marc-André Lemburg
<mal@egenix.com>
Fri, 15 Oct 2004 07:45:05 +0000
(07:45 +0000)
Python 2.3.x candidate.
Objects/unicodeobject.c
patch
|
blob
|
history
diff --git
a/Objects/unicodeobject.c
b/Objects/unicodeobject.c
index 670fca4d51eea22481d10874fc096303a60e1931..48821bd247c7cb1f19f63744b03eb431d56169b5 100644
(file)
--- a/
Objects/unicodeobject.c
+++ b/
Objects/unicodeobject.c
@@
-368,7
+368,7
@@
PyObject *PyUnicode_FromWideChar(register const wchar_t *w,
register Py_UNICODE *u;
register int i;
u = PyUnicode_AS_UNICODE(unicode);
- for (i = size; i >
=
0; i--)
+ for (i = size; i > 0; i--)
*u++ = *w++;
}
#endif
@@
-393,7
+393,7
@@
int PyUnicode_AsWideChar(PyUnicodeObject *unicode,
register Py_UNICODE *u;
register int i;
u = PyUnicode_AS_UNICODE(unicode);
- for (i = size; i >
=
0; i--)
+ for (i = size; i > 0; i--)
*w++ = *u++;
}
#endif