Avoid trying to mmap() or read a zero-byte database file.
authorMichael Poole <mdpoole@troilus.org>
Fri, 27 Jul 2007 03:15:23 +0000 (23:15 -0400)
committerMichael Poole <mdpoole@troilus.org>
Fri, 27 Jul 2007 03:15:42 +0000 (23:15 -0400)
commit5c54660f454c28a83d4b3c35b57cca9ad855f7e4
treef755f877ea7894de261fd641aa70c832902db95b
parent5c7a8fcb318fb70acedd51bcce0412536f3e5777
Avoid trying to mmap() or read a zero-byte database file.

src/recdb.c (parse_database): If the file is empty, we can just return an
  empty database without trying to mmap() it (zero-sized mmap generates
  EINVAL) or trying to read it.
src/recdb.c