1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
https://bugs.gentoo.org/909834
https://hg.osdn.net/view/graphicsmagick/GM/rev/03561d79e918
# HG changeset patch
# User Bob Friesenhahn <bfriesen@GraphicsMagick.org>
# Date 1676216369 21600
# Node ID 03561d79e9180a65d204b6240a5846fd8b01d1b4
# Parent 6eb67db043d537ae350409535873c5cbf55ba14c
ReadJPEGImage(): Use MagickAllocateResourceLimitedClearedArray()
--- a/coders/jpeg.c
+++ b/coders/jpeg.c
@@ -1695,7 +1695,7 @@
}
}
- jpeg_pixels=MagickAllocateResourceLimitedArray(JSAMPLE *,
+ jpeg_pixels=MagickAllocateResourceLimitedClearedArray(JSAMPLE *,
jpeg_info.output_components,
MagickArraySize(image->columns,
sizeof(JSAMPLE)));
@@ -1704,9 +1704,6 @@
jpeg_destroy_decompress(&jpeg_info);
ThrowJPEGReaderException(ResourceLimitError,MemoryAllocationFailed,image);
}
- (void) memset(jpeg_pixels,0,MagickArraySize(jpeg_info.output_components,
- MagickArraySize(image->columns,
- sizeof(JSAMPLE))));
/*
Extended longjmp-based error handler (with jpeg_pixels)
|