1 parent decd597 commit ff3bdeaCopy full SHA for ff3bdea
1 file changed
py/stream.c
@@ -30,6 +30,7 @@ static mp_obj_t stream_read(uint n_args, const mp_obj_t *args) {
30
if (out_sz == -1) {
31
nlr_jump(mp_obj_new_exception_msg_varg(MP_QSTR_OSError, "[Errno %d]", error));
32
} else {
33
+ buf = m_realloc(buf, sz + 1, out_sz + 1);
34
buf[out_sz] = 0;
35
return mp_obj_new_str(qstr_from_str_take(buf, /*out_sz,*/ sz + 1));
36
}
0 commit comments