diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-01-24 00:22:47 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-01-24 00:22:47 +0200 |
commit | ca3dbb8d8bd7fa5cc08af00af538ca62158763a1 (patch) | |
tree | 7f995a56353f490804ca44935075a523df2c2ec0 | |
parent | 66b060f3e6c7914a4bf4aeb6b86dd3b6a5d8b7a3 (diff) |
stream: readall(): Make sure there's a trailing NUL char.
-rw-r--r-- | py/stream.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/py/stream.c b/py/stream.c index 921459a8d..b4ce1081b 100644 --- a/py/stream.c +++ b/py/stream.c @@ -289,6 +289,7 @@ STATIC mp_obj_t stream_readall(mp_obj_t self_in) { } vstr.len = total_size; + vstr.buf[total_size] = '\0'; return mp_obj_new_str_from_vstr(STREAM_CONTENT_TYPE(o->type->stream_p), &vstr); } |