]> git.cworth.org Git - notmuch/commit
notmuch-restore: handle empty input file, leading blank lines and comments.
authorDavid Bremner <bremner@debian.org>
Wed, 26 Dec 2012 19:36:33 +0000 (15:36 -0400)
committerDavid Bremner <bremner@debian.org>
Sun, 6 Jan 2013 14:04:19 +0000 (10:04 -0400)
commitd705a6a45bf691b60101203bd09a459be255dceb
tree8b6cdece4639058e6151cfefa62470ed942865b7
parent4dea9bb442f18081347708bc5446db505441fbba
notmuch-restore: handle empty input file, leading blank lines and comments.

This patch corrects several undesirable behaviours:

1) Empty files were not detected, leading to buffer read overrun.

2) An initial blank line cause restore to silently abort

3) Initial comment line caused format detection to fail
notmuch-restore.c
test/dump-restore