Commit faa7648f authored by Michael W. Hudson's avatar Michael W. Hudson

More bug #1077106 stuff, sorry -- modem induced impatiece!

This should go on whatever bugfix branches the other fetches up on.
parent 9867ced6
...@@ -21,6 +21,8 @@ Core and builtins ...@@ -21,6 +21,8 @@ Core and builtins
- set and frozenset objects can now be marshalled. SF #1098985. - set and frozenset objects can now be marshalled. SF #1098985.
- Bug #1077106: Poor argument checking could cause memory corruption
in calls to os.read().
Extension Modules Extension Modules
----------------- -----------------
......
...@@ -52,6 +52,7 @@ PyObject * ...@@ -52,6 +52,7 @@ PyObject *
PyString_FromStringAndSize(const char *str, int size) PyString_FromStringAndSize(const char *str, int size)
{ {
register PyStringObject *op; register PyStringObject *op;
assert(size >= 0);
if (size == 0 && (op = nullstring) != NULL) { if (size == 0 && (op = nullstring) != NULL) {
#ifdef COUNT_ALLOCS #ifdef COUNT_ALLOCS
null_strings++; null_strings++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment