The char array named "buffer" is unlikely to contain a NUL character, so
printing its contents using %s in a die() format is unsafe. Clang's
ASan reports running over the end of buffer in the recently added
skiplist tests in t5504-fetch-receive-strict.sh as a result.
Use an idiomatic strbuf_getl
On Sat, Aug 11, 2018 at 05:39:27PM +0200, René Scharfe wrote:
> The char array named "buffer" is unlikely to contain a NUL character, so
> printing its contents using %s in a die() format is unsafe. Clang's
> ASan reports running over the end of buffer in the recently added
> skiplist tests in t5
Am 11.08.2018 um 18:48 schrieb Jeff King:
And one I'm not sure about:
- a read() error will now be quietly ignored; I guess we'd have to
check ferror(fp) to cover this. I'm not sure if it matters.
I'm not sure, either. It would catch media errors or file system
corruption, right? Sound
3 matches
Mail list logo