coherentsolutions/kowhai — pull request #10 by othane (2014-06-15 23:19:24+00:00)
Title: fix buffer overrun in [kowhai_]serialize_nodes

we were not always checking if a recursive call went off the end of the
buffer and since snprintf uses a size_t which is assumed to be unsigned
it thinks the buffer is huge and writes the next line (over running the
buffer), following the overrun our "if (r > dst_len)" knows we did
something wrong, but the damage is done ... this can continue in a loop
over array items which will really screw the memory after the buffer