Closed omltorg closed 8 years ago
i did replace it with:
while ((fgets(line, 512, fileLIST)) != NULL)
...but something broke in cachelist(); seems now lstat fails at line 60:
if (lstat(line, &buf) <0 )
Well, since gopreload now uses code from fmlock as a replacement for manandlock, this issue is solved.
line 119 in main may lead to a buffer overflow if /tmp/listpreload.txt contains a line longer than 511 bytes. The line should be replace by
(fgets(line, 512, file)) != NULL
. To improve code quality the magic number 512 should probably be a const.