aboutsummaryrefslogtreecommitdiffstats
path: root/jstdhuff.c
diff options
context:
space:
mode:
Diffstat (limited to 'jstdhuff.c')
-rw-r--r--jstdhuff.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/jstdhuff.c b/jstdhuff.c
index b29e5ea4..1264259c 100644
--- a/jstdhuff.c
+++ b/jstdhuff.c
@@ -41,6 +41,7 @@ add_huff_table (j_common_ptr cinfo,
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;