diff options
Diffstat (limited to 'extmod/modjson.c')
-rw-r--r-- | extmod/modjson.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/extmod/modjson.c b/extmod/modjson.c index e655a02bc0..11aedd1983 100644 --- a/extmod/modjson.c +++ b/extmod/modjson.c @@ -160,7 +160,8 @@ static mp_obj_t mod_json_load(mp_obj_t stream_obj) { for (;;) { cont: if (S_END(s)) { - break; + // Input finished abruptly in the middle of a composite entity. + goto fail; } mp_obj_t next = MP_OBJ_NULL; bool enter = false; |