<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git/tests/jittertest/filename_bounds.sh.in, branch v2.3.1</title>
<subtitle>A mirror of http://git.infradead.org/mtd-utils.git</subtitle>
<id>https://git.infraroot.at/mtd-utils.git/atom?h=v2.3.1</id>
<link rel='self' href='https://git.infraroot.at/mtd-utils.git/atom?h=v2.3.1'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/'/>
<updated>2026-04-13T06:42:56+00:00</updated>
<entry>
<title>mtd-utils: tests: jittertest: reject overlong file names</title>
<updated>2026-04-13T06:42:56+00:00</updated>
<author>
<name>Aviv Daum</name>
<email>aviv.daum@gmail.com</email>
</author>
<published>2026-03-18T22:53:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=514063a6d7a628e358894b6a6a6cb089c264fc09'/>
<id>urn:sha1:514063a6d7a628e358894b6a6a6cb089c264fc09</id>
<content type='text'>
plotJittervsFill copies the -f argument into a 250-byte buffer with
strncpy(..., sizeof(LogFile)). A 250-byte file name leaves the buffer
unterminated, and the subsequent fopen() reads past the end of LogFile.

JitterTest uses the same fixed-size file name pattern for -r, while -c
still silently truncates overlong names and -f already rejects them.

Validate jittertest file name arguments before copying them so these
options all reject overlong input instead of truncating it or reading
past the end of fixed-size buffers.

Add a shell regression test that exercises the accepted and rejected
boundary lengths for plotJittervsFill and JitterTest during make check.

Signed-off-by: Aviv Daum &lt;aviv.daum@gmail.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
</feed>
