blob: a5a4212c28ee80e378e355b8dbab3a0c6916513b (
plain) (
blame)
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
32
33
|
Copied from https://hg.mozilla.org/releases/mozilla-esr38/raw-rev/88f1eb2c3f4b
# HG changeset patch
# User Timothy Nikkel <tnikkel@gmail.com>
# Date 1457637807 21600
# Node ID 88f1eb2c3f4b4b57365ed88223cf8adc2bec4610
# Parent bf34b97757b334af1f9f53b9b59e0b6902e7ed6f
Bug 1187420. r=drc r=jmuizelaar a=sylvestre
MozReview-Commit-ID: Hh0Khqfj8Bf
diff --git a/media/libjpeg/jstdhuff.c b/media/libjpeg/jstdhuff.c
--- a/media/libjpeg/jstdhuff.c
+++ b/media/libjpeg/jstdhuff.c
@@ -36,16 +36,17 @@ add_huff_table (j_common_ptr cinfo,
*/
nsymbols = 0;
for (len = 1; len <= 16; len++)
nsymbols += bits[len];
if (nsymbols < 1 || nsymbols > 256)
ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
MEMCOPY((*htblptr)->huffval, val, nsymbols * sizeof(UINT8));
+ MEMZERO(&((*htblptr)->huffval[nsymbols]), (256 - nsymbols) * sizeof(UINT8));
/* Initialize sent_table FALSE so table will be written to JPEG file. */
(*htblptr)->sent_table = FALSE;
}
LOCAL(void)
std_huff_tables (j_common_ptr cinfo)
|