]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.4'
authorChristoph M. Becker <cmbecker69@gmx.de>
Tue, 17 Mar 2020 09:33:28 +0000 (10:33 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Tue, 17 Mar 2020 09:33:28 +0000 (10:33 +0100)
* PHP-7.4:
  [ci skip] Update NEWS
  Fix test
  Fix bug #79329 - get_headers should not accept \0
  Fixed bug #79282
  Fix #79283: Segfault in libmagic patch contains a buffer overflow
  Fix #79371: mb_strtolower (UTF-32LE): stack-buffer-overflow
  [ci skip] Update NEWS
  Fix test
  Fix bug #79329 - get_headers should not accept \0
  Fixed bug #79282
  Fix #79371: mb_strtolower (UTF-32LE): stack-buffer-overflow

1  2 
ext/exif/exif.c

diff --cc ext/exif/exif.c
index 2bb34d972b87018a3c6574125d4f9e252b0a85a1,2dee5cdffe21681331eee30f3b5ad62bc829e676..8606bdd9269e736fb639dc47cb417b1cf870440c
@@@ -3640,13 -3676,12 +3640,18 @@@ static int exif_process_IFD_in_JPEG(ima
  static void exif_process_TIFF_in_JPEG(image_info_type *ImageInfo, char *CharBuf, size_t length, size_t displacement)
  {
        unsigned exif_value_2a, offset_of_ifd;
 +      exif_offset_info info;
 +
 +      if (length < 2) {
 +              exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "Missing TIFF alignment marker");
 +              return;
 +      }
  
+       if (length < 2) {
+               exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "Missing TIFF alignment marker");
+               return;
+       }
        /* set the thumbnail stuff to nothing so we can test to see if they get set up */
        if (memcmp(CharBuf, "II", 2) == 0) {
                ImageInfo->motorola_intel = 0;