On Sat, Aug 25, 2018 at 08:50:28PM +0200, René Scharfe wrote:
> buffer is unlikely to contain a NUL character, so printing its contents
> using %s in a die() format is unsafe (detected with ASan).
Having mostly forgotten about our earlier discussion, I got confused by
this, thinking the problem
buffer is unlikely to contain a NUL character, so printing its contents
using %s in a die() format is unsafe (detected with ASan).
Use an idiomatic strbuf_getline() loop instead, which ensures the buffer
is always NUL-terminated, supports CRLF files as well, accepts files
without a newline after
2 matches
Mail list logo