[trunk] added check for tile component data size overflow (fixes issue 432)
[openjpeg.git] / src / lib / openjp2 / mqc.h
index bc4e0055c8578c5c8d4d5465f189948ac139544d..69a2d4602992c36b7983ee2a59287fa31a421522 100644 (file)
@@ -1,9 +1,15 @@
 /*
- * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
- * Copyright (c) 2002-2007, Professor Benoit Macq
+ * The copyright in this software is being made available under the 2-clauses 
+ * BSD License, included below. This software may be subject to other third 
+ * party and contributor rights, including patent rights, and no such rights
+ * are granted under this license.
+ *
+ * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
+ * Copyright (c) 2002-2014, Professor Benoit Macq
  * Copyright (c) 2001-2003, David Janssens
  * Copyright (c) 2002-2003, Yannick Verschueren
- * Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe
+ * Copyright (c) 2003-2007, Francois-Olivier Devaux 
+ * Copyright (c) 2003-2014, Antonin Descampe
  * Copyright (c) 2005, Herve Drolon, FreeImage Team
  * Copyright (c) 2008, Jerome Fimes, Communications & Systemes <jerome.fimes@c-s.fr>
  * All rights reserved.
@@ -50,7 +56,7 @@ typedef struct opj_mqc_state {
        /** the probability of the Least Probable Symbol (0.75->0x8000, 1.5->0xffff) */
        OPJ_UINT32 qeval;
        /** the Most Probable Symbol (0 or 1) */
-       OPJ_INT32 mps;
+       OPJ_UINT32 mps;
        /** next state if the next encoded symbol is the MPS */
        struct opj_mqc_state *nmps;
        /** next state if the next encoded symbol is the LPS */
@@ -186,7 +192,7 @@ Initialize the decoder
 @param bp Pointer to the start of the buffer from which the bytes will be read
 @param len Length of the input buffer
 */
-opj_bool opj_mqc_init_dec(opj_mqc_t *mqc, OPJ_BYTE *bp, OPJ_UINT32 len);
+OPJ_BOOL opj_mqc_init_dec(opj_mqc_t *mqc, OPJ_BYTE *bp, OPJ_UINT32 len);
 /**
 Decode a symbol
 @param mqc MQC handle