You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.0 KiB

  1. From 98ed6179dec22db48f6e235d8ca9e2708bf4e71a Mon Sep 17 00:00:00 2001
  2. From: Even Rouault <even.rouault@spatialys.com>
  3. Date: Sat, 12 May 2018 14:24:15 +0200
  4. Subject: [PATCH 4/4] TIFFWriteDirectorySec: avoid assertion. Fixes
  5. http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963
  6. ---
  7. libtiff/tif_dirwrite.c | 7 +++++--
  8. 1 file changed, 5 insertions(+), 2 deletions(-)
  9. diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c
  10. index c68d6d2..5d0a669 100644
  11. --- a/libtiff/tif_dirwrite.c
  12. +++ b/libtiff/tif_dirwrite.c
  13. @@ -697,8 +697,11 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff)
  14. }
  15. break;
  16. default:
  17. - assert(0); /* we should never get here */
  18. - break;
  19. + TIFFErrorExt(tif->tif_clientdata,module,
  20. + "Cannot write tag %d (%s)",
  21. + TIFFFieldTag(o),
  22. + o->field_name ? o->field_name : "unknown");
  23. + goto bad;
  24. }
  25. }
  26. }
  27. --
  28. 2.17.0