about summary refs log tree commit diff
path: root/converter
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2019-08-29 20:53:19 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2019-08-29 20:53:19 +0000
commitad6f7da845c93eeb6634e8e2931a8c08440700bb (patch)
tree2ab6332693e0f6e39b46a1b6f49ab18edf1b983b /converter
parent061042409d376b8d7d3aeadbd6d46c2f34bde9cb (diff)
downloadnetpbm-mirror-ad6f7da845c93eeb6634e8e2931a8c08440700bb.tar.gz
netpbm-mirror-ad6f7da845c93eeb6634e8e2931a8c08440700bb.tar.xz
netpbm-mirror-ad6f7da845c93eeb6634e8e2931a8c08440700bb.zip
Fix assertion failure
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3669 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter')
-rw-r--r--converter/other/jpeg2000/libjasper/jpc/jpc_dec.c4
-rw-r--r--converter/other/jpeg2000/libjasper/jpc/jpc_math.c4
-rw-r--r--converter/other/jpeg2000/libjasper/jpc/jpc_math.h7
3 files changed, 9 insertions, 6 deletions
diff --git a/converter/other/jpeg2000/libjasper/jpc/jpc_dec.c b/converter/other/jpeg2000/libjasper/jpc/jpc_dec.c
index 0f162051..4d4dfc50 100644
--- a/converter/other/jpeg2000/libjasper/jpc/jpc_dec.c
+++ b/converter/other/jpeg2000/libjasper/jpc/jpc_dec.c
@@ -597,7 +597,9 @@ static int jpc_dec_process_sod(jpc_dec_t *dec, jpc_ms_t *ms)
         if (!jpc_dec_cp_isvalid(tile->cp)) {
             return -1;
         }
-        jpc_dec_cp_prepare(tile->cp);
+        if (jpc_dec_cp_prepare(tile->cp)) {
+            return -1;
+        }
         if (jpc_dec_tileinit(dec, tile)) {
             return -1;
         }
diff --git a/converter/other/jpeg2000/libjasper/jpc/jpc_math.c b/converter/other/jpeg2000/libjasper/jpc/jpc_math.c
index 72e3ac37..01e3611e 100644
--- a/converter/other/jpeg2000/libjasper/jpc/jpc_math.c
+++ b/converter/other/jpeg2000/libjasper/jpc/jpc_math.c
@@ -12,7 +12,7 @@
 /* Calculate the integer quantity floor(log2(x)), where x is a positive
   integer. */
 int
-jpc_floorlog2(int const arg) {
+jpc_floorlog2(int_fast32_t const arg) {
 
 	int y;
     int x;
@@ -46,7 +46,7 @@ jpc_firstone(n)    :-1 0  1  1  2  2  2  2  3  3  3  3  3  3  3  3  4  4  4  4
 
 
 int
-jpc_firstone(int const arg) {
+jpc_firstone(int_fast32_t const arg) {
 /*---------------------------------------------------------------------------- 
   Calculate the bit position of the first leading one in a nonnegative
   integer.
diff --git a/converter/other/jpeg2000/libjasper/jpc/jpc_math.h b/converter/other/jpeg2000/libjasper/jpc/jpc_math.h
index 77df0c62..cd24c6a6 100644
--- a/converter/other/jpeg2000/libjasper/jpc/jpc_math.h
+++ b/converter/other/jpeg2000/libjasper/jpc/jpc_math.h
@@ -115,7 +115,8 @@
 * Includes
 \******************************************************************************/
 
-#include	<assert.h>
+#include <assert.h>
+#include <stdint.h>
 
 /******************************************************************************\
 * Macros
@@ -146,10 +147,10 @@
 
 /* Calculate the bit position of the first leading one in a nonnegative
   integer. */
-int jpc_firstone(int x);
+int jpc_firstone(int_fast32_t x);
 
 /* Calculate the integer quantity floor(log2(x)), where x is a positive
   integer. */
-int jpc_floorlog2(int x);
+int jpc_floorlog2(int_fast32_t x);
 
 #endif