diff options
| author | smaybe <none@none> | 2007-02-06 15:00:42 -0800 |
|---|---|---|
| committer | smaybe <none@none> | 2007-02-06 15:00:42 -0800 |
| commit | 9e6e15042fe8eed186bfa123fa6d79d7728f0ade (patch) | |
| tree | a6b7ad08e9c6437f42d54638acd4641c0b8d4c80 /usr/src/common/fs/decompress.c | |
| parent | e5d31070713ca0711b47a2b8ad813e4c4b1d90ef (diff) | |
| download | illumos-joyent-9e6e15042fe8eed186bfa123fa6d79d7728f0ade.tar.gz | |
6520712 DBoot complains about zero size conf files.
6520956 zmod is gone, so ZMOD_OBJS should go away, too
Diffstat (limited to 'usr/src/common/fs/decompress.c')
| -rw-r--r-- | usr/src/common/fs/decompress.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr/src/common/fs/decompress.c b/usr/src/common/fs/decompress.c index 8c78302c6f..be822458a7 100644 --- a/usr/src/common/fs/decompress.c +++ b/usr/src/common/fs/decompress.c @@ -106,6 +106,12 @@ cf_check_compressed(fileid_t *filep) unsigned char *filebytes; z_stream *zsp; + /* + * If the file is not long enough to check for a decompression header + * then return not compressed. + */ + if (filep->fi_inode->i_size < 3) + return (0); filep->fi_offset = 0; if ((filep->fi_getblock)(filep) == -1) return (-1); |
