bk: 50027973OLEPnu_SE_hVp5X167-bxg
+* CID 97377: ntp-keygen.c's followlink() might not NUL-terminate.
* CID 709185: refclock_chu.c will leak fd==0 (which should be impossible).
(4.2.7p288) 2012/07/03 Released by Harlan Stenn <stenn@ntp.org>
* CID 709173: Make sure a libisc function we do not use is called properly.
{
int len;
+ REQUIRE(bufsiz > 0);
+
len = readlink(fname, fname, (int)bufsiz);
- if (len < 0 || bufsiz < 1)
+ if (len < 0 ) {
+ fname[0] = '\0';
return;
+ }
if (len > (int)bufsiz - 1)
len = (int)bufsiz - 1;
fname[len] = '\0';