Comment by tyingq
4 years ago
This HN comment and its follow ups are an interesting read. There are some stdlib implementations that don't have this issue.
4 years ago
This HN comment and its follow ups are an interesting read. There are some stdlib implementations that don't have this issue.
also a trivial workaround is to wrap the buffer with a FILE via fmemopen(3), which makes the temporary FILE object explicit and persistent for the whole parse, and needs just one strlen call.
https://news.ycombinator.com/item?id=26343149