]> git.ipfire.org Git - thirdparty/zstd.git/commit
fix the assertion in readLinesFromFile (#3084)
authorXi Ruoyao <xry111@mengyan1223.wang>
Fri, 4 Mar 2022 19:56:44 +0000 (03:56 +0800)
committerGitHub <noreply@github.com>
Fri, 4 Mar 2022 19:56:44 +0000 (14:56 -0500)
commitd109cef2012b1e0ca7a6f47278a2838f68bbc196
treeeb549686ae9ba409494b62471c1897b425fda107
parente8448a3d61a9e84d7664da755bc3dc41ee0f0557
fix the assertion in readLinesFromFile (#3084)

* fix the assertion in readLinesFromFile

When the file is not terminated by endline, readLineFromFile will append
a '\0' for the last line.  In this case pos + lineLength == dstCapacity.

* test: don't print very long text garbage
programs/util.c
tests/playTests.sh