Re: [PATCH v2 1/2] fsck: use strbuf_getline() to read skiplist file

2018-08-27 Thread Jeff King
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

[PATCH v2 1/2] fsck: use strbuf_getline() to read skiplist file

2018-08-25 Thread René Scharfe
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