• R/O
  • SSH

GM: Commit

Main GraphicsMagick source repository


Commit MetaInfo

Revision00cac454181210fb365634a45c9d3539cb610220 (tree)
Time2022-01-13 10:14:50
AuthorBob Friesenhahn <bfriesen@Grap...>
CommiterBob Friesenhahn

Log Message

ReadPNMImage(): Make sure that we don't lose the image exception

Change Summary

Incremental Difference

diff -r 024041c500c7 -r 00cac4541812 ChangeLog
--- a/ChangeLog Tue Jan 11 18:12:46 2022 -0600
+++ b/ChangeLog Wed Jan 12 19:14:50 2022 -0600
@@ -1,3 +1,12 @@
1+2022-01-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
2+
3+ * magick/blob.c (ReadBlob): Fix EOF logic. Addresses oss-fuzz
4+ 43490 "graphicsmagick:coder_PNM_fuzzer: Use-of-uninitialized-value
5+ in SyncImageCallBack".
6+
7+ * coders/pnm.c (ReadPNMImage): Make sure that we don't lose the
8+ image exception.
9+
110 2022-01-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
211
312 * magick/blob.c: Throw a user-friendly exception when the read
diff -r 024041c500c7 -r 00cac4541812 VisualMagick/installer/inc/version.isx
--- a/VisualMagick/installer/inc/version.isx Tue Jan 11 18:12:46 2022 -0600
+++ b/VisualMagick/installer/inc/version.isx Wed Jan 12 19:14:50 2022 -0600
@@ -10,5 +10,5 @@
1010
1111 #define public MagickPackageName "GraphicsMagick"
1212 #define public MagickPackageVersion "1.4"
13-#define public MagickPackageVersionAddendum ".020220111"
14-#define public MagickPackageReleaseDate "snapshot-20220111"
13+#define public MagickPackageVersionAddendum ".020220112"
14+#define public MagickPackageReleaseDate "snapshot-20220112"
diff -r 024041c500c7 -r 00cac4541812 coders/pnm.c
--- a/coders/pnm.c Tue Jan 11 18:12:46 2022 -0600
+++ b/coders/pnm.c Wed Jan 12 19:14:50 2022 -0600
@@ -1152,15 +1152,18 @@
11521152 DestroyThreadViewDataSet(scanline_set);
11531153 image->is_monochrome=is_monochrome;
11541154 image->is_grayscale=is_grayscale;
1155+ if ((status == MagickFail) && (image->exception.severity))
1156+ CopyException(exception,&image->exception);
11551157 if (EOFBlob(image))
1156- ThrowException(exception,CorruptImageError,UnexpectedEndOfFile,
1157- image->filename);
1158+ ThrowReaderException(CorruptImageError,UnexpectedEndOfFile,image);
11581159 break;
11591160 }
11601161 default:
11611162 ThrowReaderException(CorruptImageError,ImproperImageHeader,image);
11621163 }
11631164 StopTimer(&image->timer);
1165+ if (status ==MagickFail)
1166+ break;
11641167 /*
11651168 Proceed to next image.
11661169 */
diff -r 024041c500c7 -r 00cac4541812 magick/blob.c
--- a/magick/blob.c Tue Jan 11 18:12:46 2022 -0600
+++ b/magick/blob.c Wed Jan 12 19:14:50 2022 -0600
@@ -3365,7 +3365,7 @@
33653365 }
33663366 assert(count <= length);
33673367 blob->read_total += count;
3368- if (count == 0)
3368+ if (count < req_length)
33693369 {
33703370 blob->eof=True;
33713371 if (blob->read_limit <= blob->read_total)
diff -r 024041c500c7 -r 00cac4541812 magick/version.h
--- a/magick/version.h Tue Jan 11 18:12:46 2022 -0600
+++ b/magick/version.h Wed Jan 12 19:14:50 2022 -0600
@@ -38,8 +38,8 @@
3838 #define MagickLibVersion 0x262300
3939 #define MagickLibVersionText "1.4"
4040 #define MagickLibVersionNumber 26,23,0
41-#define MagickChangeDate "20220111"
42-#define MagickReleaseDate "snapshot-20220111"
41+#define MagickChangeDate "20220112"
42+#define MagickReleaseDate "snapshot-20220112"
4343
4444 /*
4545 The MagickLibInterfaceNewest and MagickLibInterfaceOldest defines
diff -r 024041c500c7 -r 00cac4541812 www/Changelog.html
--- a/www/Changelog.html Tue Jan 11 18:12:46 2022 -0600
+++ b/www/Changelog.html Wed Jan 12 19:14:50 2022 -0600
@@ -35,6 +35,14 @@
3535 <div class="document">
3636
3737
38+<p>2022-01-12 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
39+<blockquote>
40+<p>* magick/blob.c (ReadBlob): Fix EOF logic. Addresses oss-fuzz
41+43490 &quot;graphicsmagick:coder_PNM_fuzzer: Use-of-uninitialized-value
42+in SyncImageCallBack&quot;.</p>
43+<p>* coders/pnm.c (ReadPNMImage): Make sure that we don't lose the
44+image exception.</p>
45+</blockquote>
3846 <p>2022-01-11 Bob Friesenhahn &lt;<a class="reference external" href="mailto:bfriesen&#37;&#52;&#48;simple&#46;dallas&#46;tx&#46;us">bfriesen<span>&#64;</span>simple<span>&#46;</span>dallas<span>&#46;</span>tx<span>&#46;</span>us</a>&gt;</p>
3947 <blockquote>
4048 <p>* magick/blob.c: Throw a user-friendly exception when the read
Show on old repository browser