Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | grub2: fix empty file handling | Jeremy Kerr | 2014-06-05 | 1 | -0/+10 |
Currently, we have a bug when parsing zero-length files: we subtract one from the length to exclude the trailing NUL (added by read_file), but a zero-length file will result in a length of -1. This change adds an explicit exit if we're attempting to parse an empty file. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> |