pantoniou / libfyaml

Fully feature complete YAML parser and emitter, supporting the latest YAML spec and passing the full YAML testsuite.
MIT License
243 stars 74 forks source link

Double free #74

Closed vitenti closed 11 months ago

vitenti commented 1 year ago

I'm getting a double free error. Debugging the code I got to line 198 of fy-doc.c:

    if (data_copy)
        fyi = fy_input_from_malloc_data((void *)text, len, &handle, true);

I suppose that should read:

    if (data_copy)
        fyi = fy_input_from_malloc_data((void *)data_copy, len, &handle, true);
pantoniou commented 11 months ago

I believe this is fixed by 618589b1d914d2cbc4053c9b1cbdcbc1e8d05d8c