locking: don't try to read more bytes than the buffer can hold
A normal lock file is apparently 1024 bytes in size, so the second attempt at reading bytes from the file would try to read 8192 more bytes into a buffer that has room for only 7168 left. According to valgrind, the read() function doesn't like that -- and true: if for some reason the lock file had suddenly expanded, the buffer would overflow. This fixes https://savannah.gnu.org/bugs/?47156.
Showing
+5 -3
Please register or sign in to comment