Merge branches 'work.misc' and 'work.dcache' of git://git.kernel.org/pub/scm/linux...
[sfrench/cifs-2.6.git] / fs / squashfs / block.c
index 2751476e6b6e85e094b33f717093ba0251af999e..f098b9f1c3963b77c2112d7f4342f58ccca4f192 100644 (file)
@@ -167,6 +167,8 @@ int squashfs_read_data(struct super_block *sb, u64 index, int length,
        }
 
        if (compressed) {
+               if (!msblk->stream)
+                       goto read_failure;
                length = squashfs_decompress(msblk, bh, b, offset, length,
                        output);
                if (length < 0)