Handle erroneous Huffman codes
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@221 632fc199-4ca6-4c93-a231-07263d6284db
diff --git a/jdhuff.h b/jdhuff.h
index 0a242c5..2697488 100644
--- a/jdhuff.h
+++ b/jdhuff.h
@@ -2,6 +2,7 @@
* jdhuff.h
*
* Copyright (C) 1991-1997, Thomas G. Lane.
+ * Copyright (C) 2010, D. R. Commander.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -27,7 +28,7 @@
/* Basic tables: (element [0] of each array is unused) */
INT32 maxcode[18]; /* largest code of length k (-1 if none) */
/* (maxcode[17] is a sentinel to ensure jpeg_huff_decode terminates) */
- INT32 valoffset[17]; /* huffval[] offset for codes of length k */
+ INT32 valoffset[18]; /* huffval[] offset for codes of length k */
/* valoffset[k] = huffval[] index of 1st symbol of code length k, less
* the smallest code of length k; so given a code of length k, the
* corresponding symbol is huffval[code + valoffset[k]]