squashfs-4.2-no-gzip-fix.patch 967 B

1234567891011121314151617181920212223242526
  1. [PATCH] squashfs-tools: unbreak builds without gzip support
  2. The initialization of gzip_comp_ops if gzip support is disabled is
  3. missing 2 null pointers, causing the id element to be initialized to 0
  4. rather than ZLIB_COMPRESSION, which breaks all the compressor functions
  5. as they loop until finding the correct element or id = 0.
  6. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
  7. ---
  8. squashfs-tools/compressor.c | 3 ++-
  9. 1 file changed, 2 insertions(+), 1 deletion(-)
  10. Index: squashfs4.2/squashfs-tools/compressor.c
  11. ===================================================================
  12. --- squashfs4.2.orig/squashfs-tools/compressor.c
  13. +++ squashfs4.2/squashfs-tools/compressor.c
  14. @@ -27,7 +27,8 @@
  15. #ifndef GZIP_SUPPORT
  16. static struct compressor gzip_comp_ops = {
  17. - NULL, NULL, NULL, NULL, NULL, NULL, ZLIB_COMPRESSION, "gzip", 0
  18. + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ZLIB_COMPRESSION,
  19. + "gzip", 0
  20. };
  21. #else
  22. extern struct compressor gzip_comp_ops;