02_fix_dirs_without_imagelength.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --- a/tif_dirread.c
  2. +++ b/tif_dirread.c
  3. @@ -3750,5 +3750,4 @@
  4. if (!TIFFFieldSet(tif, FIELD_IMAGEDIMENSIONS))
  5. {
  6. - MissingRequired(tif, "ImageLength");
  7. - goto bad;
  8. + TIFFWarningExtR(tif, module, "TIFF directory is missing required ImageLength field");
  9. }
  10. @@ -4263,4 +4263,3 @@
  11. if (!tif->tif_scanlinesize) {
  12. - TIFFErrorExtR(tif, module, "Cannot handle zero scanline size");
  13. - return (0);
  14. + TIFFWarningExtR(tif, module, "Cannot handle zero scanline size");
  15. }
  16. @@ -4263,4 +4263,3 @@
  17. if (!tif->tif_tilesize) {
  18. - TIFFErrorExtR(tif, module, "Cannot handle zero tile size");
  19. - return (0);
  20. + TIFFWarningExtR(tif, module, "Cannot handle zero tile size");
  21. }
  22. @@ -4263,4 +4263,3 @@
  23. if (!TIFFStripSize(tif)) {
  24. - TIFFErrorExtR(tif, module, "Cannot handle zero strip size");
  25. - return (0);
  26. + TIFFWarningExt(tif, module, "Cannot handle zero strip size");
  27. }
  28. @@ -5377,6 +5377,6 @@ static void MissingRequired(TIFF *tif, const char *tagname)
  29. {
  30. static const char module[] = "MissingRequired";
  31. - TIFFErrorExtR(tif, module,
  32. + TIFFWarningExtR(tif, module,
  33. "TIFF directory is missing required \"%s\" field", tagname);
  34. }
  35. --- a/tif_strip.c
  36. +++ b/tif_strip.c
  37. @@ -300,5 +300,5 @@
  38. if (scanline_size == 0)
  39. {
  40. - TIFFErrorExtR(tif, module, "Computed scanline size is zero");
  41. + TIFFWarningExtR(tif, module, "Computed scanline size is zero");
  42. return 0;
  43. }