commit | 2faad1230a01fee8a00aa51a9646555615885a1e | [log] [tgz] |
---|---|---|
author | Benno Schulenberg <bensberg@justemail.net> | Sat Apr 23 20:39:02 2016 +0200 |
committer | Benno Schulenberg <bensberg@justemail.net> | Sat Apr 23 20:41:23 2016 +0200 |
tree | e903be99cf38494c2f934796b9ce4f85fb917b60 | |
parent | bfe418febb1cd2a6087f92fefce5421b11f8a5ba [diff] |
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.