Skip to content
Snippets Groups Projects
Commit ca3dbb8d authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

stream: readall(): Make sure there's a trailing NUL char.

parent 66b060f3
Branches
No related tags found
No related merge requests found
...@@ -289,6 +289,7 @@ STATIC mp_obj_t stream_readall(mp_obj_t self_in) { ...@@ -289,6 +289,7 @@ STATIC mp_obj_t stream_readall(mp_obj_t self_in) {
} }
vstr.len = total_size; vstr.len = total_size;
vstr.buf[total_size] = '\0';
return mp_obj_new_str_from_vstr(STREAM_CONTENT_TYPE(o->type->stream_p), &vstr); return mp_obj_new_str_from_vstr(STREAM_CONTENT_TYPE(o->type->stream_p), &vstr);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment