segfault on yaml_string_write_handler

Issue #21 new
Morel Bérenger
created an issue

There is a segfault in this function. I fixed this several days ago so can't remember how to trigger it, but basically, those lines

-    if (emitter->output.string.size + *emitter->output.string.size_written
-            < size) {

are just wrong. I also took the liberty to rewrite completely this function, considering that the current one is hard to read and contain duplicated code. You might want to change the variable names if you have some preferences for a different code style.

Patch included.

Comments (0)

  1. Log in to comment