Browse Source

Fix CBOR decoding of large concatenated strings

The code was missing a duk_require_stack() which caused decoding to fail
if a string was pieced together from a lot of parts.
pull/2093/head
Sami Vaarala 6 years ago
parent
commit
5c78175b4f
  1. 1
      extras/cbor/duk_cbor.c

1
extras/cbor/duk_cbor.c

@ -718,6 +718,7 @@ static void duk__cbor_decode_and_join_strbuf(duk_cbor_decode_context *dec_ctx, d
if (duk__cbor_decode_checkbreak(dec_ctx)) {
break;
}
duk_require_stack(dec_ctx->ctx, 1);
duk__cbor_decode_buffer(dec_ctx, expected_base);
count++;
if (count <= 0) {

Loading…
Cancel
Save