summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/openjp2/CMakeLists.txt3
-rw-r--r--src/lib/openjp2/ht_dec.c3
-rw-r--r--src/lib/openjp2/j2k.c17
-rw-r--r--src/lib/openjp2/openjpeg.h2
-rw-r--r--src/lib/openjp2/opj_config.h.cmake.in1
-rw-r--r--src/lib/openjp2/opj_config_private.h.cmake.in3
-rw-r--r--src/lib/openjp2/opj_includes.h3
-rw-r--r--src/lib/openjp2/opj_inttypes.h48
-rw-r--r--src/lib/openjp2/opj_stdint.h52
-rw-r--r--src/lib/openjp2/t1_ht_generate_luts.c10
-rw-r--r--src/lib/openjp2/tcd.c2
-rw-r--r--src/lib/openjpip/box_manager.c2
-rw-r--r--src/lib/openjpip/boxheader_manager.c2
-rw-r--r--src/lib/openjpip/byte_manager.h2
-rw-r--r--src/lib/openjpip/cachemodel_manager.c2
-rw-r--r--src/lib/openjpip/codestream_manager.c2
-rw-r--r--src/lib/openjpip/dec_clientmsg_handler.c2
-rw-r--r--src/lib/openjpip/faixbox_manager.c2
-rw-r--r--src/lib/openjpip/index_manager.c2
-rw-r--r--src/lib/openjpip/jp2k_encoder.c2
-rw-r--r--src/lib/openjpip/metadata_manager.c2
-rw-r--r--src/lib/openjpip/mhixbox_manager.c2
-rw-r--r--src/lib/openjpip/msgqueue_manager.c2
-rw-r--r--src/lib/openjpip/placeholder_manager.c2
-rw-r--r--src/lib/openjpip/query_parser.c2
-rw-r--r--src/lib/openjpip/sock_manager.h2
26 files changed, 43 insertions, 131 deletions
diff --git a/src/lib/openjp2/CMakeLists.txt b/src/lib/openjp2/CMakeLists.txt
index f92044e8..8fda14dc 100644
--- a/src/lib/openjp2/CMakeLists.txt
+++ b/src/lib/openjp2/CMakeLists.txt
@@ -54,7 +54,6 @@ set(OPENJPEG_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/opj_intmath.h
${CMAKE_CURRENT_SOURCE_DIR}/opj_malloc.c
${CMAKE_CURRENT_SOURCE_DIR}/opj_malloc.h
- ${CMAKE_CURRENT_SOURCE_DIR}/opj_stdint.h
${CMAKE_CURRENT_SOURCE_DIR}/sparse_array.c
${CMAKE_CURRENT_SOURCE_DIR}/sparse_array.h
)
@@ -123,7 +122,7 @@ install(TARGETS ${INSTALL_LIBS}
)
# Install includes files
-install(FILES openjpeg.h opj_stdint.h
+install(FILES openjpeg.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${OPENJPEG_INSTALL_SUBDIR} COMPONENT Headers
)
diff --git a/src/lib/openjp2/ht_dec.c b/src/lib/openjp2/ht_dec.c
index 120d7e49..9ea061f3 100644
--- a/src/lib/openjp2/ht_dec.c
+++ b/src/lib/openjp2/ht_dec.c
@@ -1210,6 +1210,9 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
/* Concatenate all chunks */
cblkdata = t1->cblkdatabuffer;
+ if (cblkdata == NULL) {
+ return OPJ_FALSE;
+ }
cblk_len = 0;
for (i = 0; i < cblk->numchunks; i++) {
memcpy(cblkdata + cblk_len, cblk->chunks[i].data, cblk->chunks[i].len);
diff --git a/src/lib/openjp2/j2k.c b/src/lib/openjp2/j2k.c
index 9dbba8f1..c0551870 100644
--- a/src/lib/openjp2/j2k.c
+++ b/src/lib/openjp2/j2k.c
@@ -3959,9 +3959,12 @@ static OPJ_BOOL opj_j2k_merge_ppm(opj_cp_t *p_cp, opj_event_mgr_t * p_manager)
opj_read_bytes(l_data, &l_N_ppm, 4);
l_data += 4;
l_data_size -= 4;
- l_ppm_data_size +=
- l_N_ppm; /* can't overflow, max 256 markers of max 65536 bytes, that is when PPM markers are not corrupted which is checked elsewhere */
+ if (l_ppm_data_size > UINT_MAX - l_N_ppm) {
+ opj_event_msg(p_manager, EVT_ERROR, "Too large value for Nppm\n");
+ return OPJ_FALSE;
+ }
+ l_ppm_data_size += l_N_ppm;
if (l_data_size >= l_N_ppm) {
l_data_size -= l_N_ppm;
l_data += l_N_ppm;
@@ -7815,7 +7818,7 @@ OPJ_BOOL opj_j2k_setup_encoder(opj_j2k_t *p_j2k,
image->comps[0].h * image->comps[0].prec) /
((double)parameters->tcp_rates[parameters->tcp_numlayers - 1] * 8 *
image->comps[0].dx * image->comps[0].dy));
- if (temp_size > INT_MAX) {
+ if (temp_size > (OPJ_FLOAT32)INT_MAX) {
parameters->max_cs_size = INT_MAX;
} else {
parameters->max_cs_size = (int) floor(temp_size);
@@ -11101,6 +11104,10 @@ static OPJ_BOOL opj_j2k_read_SQcd_SQcc(opj_j2k_t *p_j2k,
l_tccp->stepsizes[l_band_no].mant = 0;
}
}
+
+ if (*p_header_size < l_num_band) {
+ return OPJ_FALSE;
+ }
*p_header_size = *p_header_size - l_num_band;
} else {
for (l_band_no = 0; l_band_no < l_num_band; l_band_no++) {
@@ -11111,6 +11118,10 @@ static OPJ_BOOL opj_j2k_read_SQcd_SQcc(opj_j2k_t *p_j2k,
l_tccp->stepsizes[l_band_no].mant = l_tmp & 0x7ff;
}
}
+
+ if (*p_header_size < 2 * l_num_band) {
+ return OPJ_FALSE;
+ }
*p_header_size = *p_header_size - 2 * l_num_band;
}
diff --git a/src/lib/openjp2/openjpeg.h b/src/lib/openjp2/openjpeg.h
index ebe78444..a421143a 100644
--- a/src/lib/openjp2/openjpeg.h
+++ b/src/lib/openjp2/openjpeg.h
@@ -122,7 +122,7 @@ typedef float OPJ_FLOAT32;
typedef double OPJ_FLOAT64;
typedef unsigned char OPJ_BYTE;
-#include "opj_stdint.h"
+#include <stdint.h>
typedef int8_t OPJ_INT8;
typedef uint8_t OPJ_UINT8;
diff --git a/src/lib/openjp2/opj_config.h.cmake.in b/src/lib/openjp2/opj_config.h.cmake.in
index 5f762ca3..50015fb9 100644
--- a/src/lib/openjp2/opj_config.h.cmake.in
+++ b/src/lib/openjp2/opj_config.h.cmake.in
@@ -1,5 +1,4 @@
/* create opj_config.h for CMake */
-#cmakedefine OPJ_HAVE_STDINT_H @OPJ_HAVE_STDINT_H@
/*--------------------------------------------------------------------------*/
/* OpenJPEG Versioning */
diff --git a/src/lib/openjp2/opj_config_private.h.cmake.in b/src/lib/openjp2/opj_config_private.h.cmake.in
index c41f9066..c559282c 100644
--- a/src/lib/openjp2/opj_config_private.h.cmake.in
+++ b/src/lib/openjp2/opj_config_private.h.cmake.in
@@ -1,5 +1,4 @@
/* create opj_config_private.h for CMake */
-#cmakedefine OPJ_HAVE_INTTYPES_H @OPJ_HAVE_INTTYPES_H@
#define OPJ_PACKAGE_VERSION "@PACKAGE_VERSION@"
@@ -11,6 +10,8 @@
/*#cmakedefine HAVE_SYS_STAT_H @HAVE_SYS_STAT_H@*/
/*#cmakedefine HAVE_SYS_TYPES_H @HAVE_SYS_TYPES_H@ */
/*#cmakedefine HAVE_UNISTD_H @HAVE_UNISTD_H@*/
+/*#cmakedefine HAVE_INTTYPES_H @HAVE_INTTYPES_H@ */
+/*#cmakedefine HAVE_STDINT_H @HAVE_STDINT_H@ */
#cmakedefine _LARGEFILE_SOURCE
#cmakedefine _LARGE_FILES
diff --git a/src/lib/openjp2/opj_includes.h b/src/lib/openjp2/opj_includes.h
index 0a8628c9..13613ce5 100644
--- a/src/lib/openjp2/opj_includes.h
+++ b/src/lib/openjp2/opj_includes.h
@@ -55,6 +55,8 @@
#include <ctype.h>
#include <assert.h>
#include <limits.h>
+#include <stdint.h>
+#include <inttypes.h>
/*
Use fseeko() and ftello() if they are available since they use
@@ -218,7 +220,6 @@ typedef unsigned int OPJ_BITFIELD;
#define OPJ_UNUSED(x) (void)x
-#include "opj_inttypes.h"
#include "opj_clock.h"
#include "opj_malloc.h"
#include "event.h"
diff --git a/src/lib/openjp2/opj_inttypes.h b/src/lib/openjp2/opj_inttypes.h
deleted file mode 100644
index 2c9749a1..00000000
--- a/src/lib/openjp2/opj_inttypes.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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) 2012, Mathieu Malaterre <mathieu.malaterre@gmail.com>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef OPJ_INTTYPES_H
-#define OPJ_INTTYPES_H
-
-#include "opj_config_private.h"
-#ifdef OPJ_HAVE_INTTYPES_H
-#include <inttypes.h>
-#else
-#if defined(_WIN32)
-#define PRId64 "I64d"
-#define PRIi64 "I64i"
-#define PRIu64 "I64u"
-#define PRIx64 "I64x"
-#else
-#error unsupported platform
-#endif
-#endif
-
-#endif /* OPJ_INTTYPES_H */
diff --git a/src/lib/openjp2/opj_stdint.h b/src/lib/openjp2/opj_stdint.h
deleted file mode 100644
index f26c921c..00000000
--- a/src/lib/openjp2/opj_stdint.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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) 2012, Mathieu Malaterre <mathieu.malaterre@gmail.com>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef OPJ_STDINT_H
-#define OPJ_STDINT_H
-
-#include "opj_config.h"
-#ifdef OPJ_HAVE_STDINT_H
-#include <stdint.h>
-#else
-#if defined(_WIN32)
-typedef signed __int8 int8_t;
-typedef unsigned __int8 uint8_t;
-typedef signed __int16 int16_t;
-typedef unsigned __int16 uint16_t;
-typedef signed __int32 int32_t;
-typedef unsigned __int32 uint32_t;
-typedef signed __int64 int64_t;
-typedef unsigned __int64 uint64_t;
-#else
-#error unsupported platform
-#endif
-#endif
-
-#endif /* OPJ_STDINT_H */
diff --git a/src/lib/openjp2/t1_ht_generate_luts.c b/src/lib/openjp2/t1_ht_generate_luts.c
index 6876e3fd..22382a5a 100644
--- a/src/lib/openjp2/t1_ht_generate_luts.c
+++ b/src/lib/openjp2/t1_ht_generate_luts.c
@@ -38,12 +38,7 @@
#include <string.h>
#include <stdio.h>
#include <assert.h>
-
-typedef int OPJ_BOOL;
-#define OPJ_TRUE 1
-#define OPJ_FALSE 0
-
-#include "opj_stdint.h"
+#include <stdint.h>
typedef int8_t OPJ_INT8;
typedef uint8_t OPJ_UINT8;
@@ -53,6 +48,9 @@ typedef int32_t OPJ_INT32;
typedef uint32_t OPJ_UINT32;
typedef int64_t OPJ_INT64;
typedef uint64_t OPJ_UINT64;
+typedef int OPJ_BOOL;
+#define OPJ_TRUE 1
+#define OPJ_FALSE 0
//************************************************************************/
/** @brief HT decoding tables, as given in the standard
diff --git a/src/lib/openjp2/tcd.c b/src/lib/openjp2/tcd.c
index b2375146..687aa61b 100644
--- a/src/lib/openjp2/tcd.c
+++ b/src/lib/openjp2/tcd.c
@@ -2333,7 +2333,7 @@ static OPJ_BOOL opj_tcd_dc_level_shift_decode(opj_tcd_t *p_tcd)
for (j = 0; j < l_height; ++j) {
for (i = 0; i < l_width; ++i) {
OPJ_FLOAT32 l_value = *((OPJ_FLOAT32 *) l_current_ptr);
- if (l_value > INT_MAX) {
+ if (l_value > (OPJ_FLOAT32)INT_MAX) {
*l_current_ptr = l_max;
} else if (l_value < INT_MIN) {
*l_current_ptr = l_min;
diff --git a/src/lib/openjpip/box_manager.c b/src/lib/openjpip/box_manager.c
index eb6b9d4c..fc3550a7 100644
--- a/src/lib/openjpip/box_manager.c
+++ b/src/lib/openjpip/box_manager.c
@@ -33,8 +33,8 @@
#include <stdlib.h>
#include <ctype.h>
#include <assert.h>
+#include <inttypes.h>
#include "box_manager.h"
-#include "opj_inttypes.h"
#ifdef SERVER
#include "fcgi_stdio.h"
diff --git a/src/lib/openjpip/boxheader_manager.c b/src/lib/openjpip/boxheader_manager.c
index f5958f64..d8f6ae6f 100644
--- a/src/lib/openjpip/boxheader_manager.c
+++ b/src/lib/openjpip/boxheader_manager.c
@@ -32,8 +32,8 @@
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
+#include <inttypes.h>
#include "boxheader_manager.h"
-#include "opj_inttypes.h"
#ifdef SERVER
#include "fcgi_stdio.h"
diff --git a/src/lib/openjpip/byte_manager.h b/src/lib/openjpip/byte_manager.h
index 57a7d501..02c806e0 100644
--- a/src/lib/openjpip/byte_manager.h
+++ b/src/lib/openjpip/byte_manager.h
@@ -32,8 +32,8 @@
#define BYTE_MANAGER_H_
#include <stddef.h>
+#include <stdint.h>
#include "openjpeg.h"
-#include "opj_stdint.h"
typedef uint8_t Byte_t;
typedef uint16_t Byte2_t;
typedef uint32_t Byte4_t;
diff --git a/src/lib/openjpip/cachemodel_manager.c b/src/lib/openjpip/cachemodel_manager.c
index 0888fc9c..3e825b8e 100644
--- a/src/lib/openjpip/cachemodel_manager.c
+++ b/src/lib/openjpip/cachemodel_manager.c
@@ -30,9 +30,9 @@
#include <stdio.h>
#include <stdlib.h>
+#include <inttypes.h>
#include "cachemodel_manager.h"
#include "faixbox_manager.h"
-#include "opj_inttypes.h"
#ifdef SERVER
#include "fcgi_stdio.h"
diff --git a/src/lib/openjpip/codestream_manager.c b/src/lib/openjpip/codestream_manager.c
index 76a1a34f..56ddd39c 100644
--- a/src/lib/openjpip/codestream_manager.c
+++ b/src/lib/openjpip/codestream_manager.c
@@ -29,8 +29,8 @@
*/
#include <stdio.h>
+#include <inttypes.h>
#include "codestream_manager.h"
-#include "opj_inttypes.h"
#ifdef SERVER
#include "fcgi_stdio.h"
diff --git a/src/lib/openjpip/dec_clientmsg_handler.c b/src/lib/openjpip/dec_clientmsg_handler.c
index c257255a..07d51630 100644
--- a/src/lib/openjpip/dec_clientmsg_handler.c
+++ b/src/lib/openjpip/dec_clientmsg_handler.c
@@ -33,11 +33,11 @@
#include <string.h>
#include <assert.h>
#include <limits.h>
+#include <inttypes.h>
#include "dec_clientmsg_handler.h"
#include "ihdrbox_manager.h"
#include "jpipstream_manager.h"
#include "jp2k_encoder.h"
-#include "opj_inttypes.h"
void handle_JPIPstreamMSG(SOCKET connected_socket, cachelist_param_t *cachelist,
Byte_t **jpipstream, OPJ_SIZE_T *streamlen, msgqueue_param_t *msgqueue)
diff --git a/src/lib/openjpip/faixbox_manager.c b/src/lib/openjpip/faixbox_manager.c
index d0b410a2..55253afa 100644
--- a/src/lib/openjpip/faixbox_manager.c
+++ b/src/lib/openjpip/faixbox_manager.c
@@ -30,8 +30,8 @@
#include <stdio.h>
#include <stdlib.h>
+#include <inttypes.h>
#include "faixbox_manager.h"
-#include "opj_inttypes.h"
#ifdef SERVER
#include "fcgi_stdio.h"
diff --git a/src/lib/openjpip/index_manager.c b/src/lib/openjpip/index_manager.c
index 64e760d7..17f5887a 100644
--- a/src/lib/openjpip/index_manager.c
+++ b/src/lib/openjpip/index_manager.c
@@ -32,8 +32,8 @@
#include <stdlib.h>
#include <math.h>
#include <string.h>
+#include <inttypes.h>
-#include "opj_inttypes.h"
#include "index_manager.h"
#include "box_manager.h"
#include "manfbox_manager.h"
diff --git a/src/lib/openjpip/jp2k_encoder.c b/src/lib/openjpip/jp2k_encoder.c
index 80b98c7e..296c1efb 100644
--- a/src/lib/openjpip/jp2k_encoder.c
+++ b/src/lib/openjpip/jp2k_encoder.c
@@ -34,10 +34,10 @@
#include <string.h>
#include <math.h>
#include <assert.h>
+#include <inttypes.h>
#include "jp2k_encoder.h"
#include "j2kheader_manager.h"
#include "imgreg_manager.h"
-#include "opj_inttypes.h"
#ifdef SERVER
diff --git a/src/lib/openjpip/metadata_manager.c b/src/lib/openjpip/metadata_manager.c
index d7128b94..697f96fb 100644
--- a/src/lib/openjpip/metadata_manager.c
+++ b/src/lib/openjpip/metadata_manager.c
@@ -29,7 +29,7 @@
*/
#include "metadata_manager.h"
-#include "opj_inttypes.h"
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/lib/openjpip/mhixbox_manager.c b/src/lib/openjpip/mhixbox_manager.c
index 1a8eaa08..5f3bdfd6 100644
--- a/src/lib/openjpip/mhixbox_manager.c
+++ b/src/lib/openjpip/mhixbox_manager.c
@@ -31,8 +31,8 @@
#include <stdio.h>
#include <stdlib.h>
+#include <inttypes.h>
#include "mhixbox_manager.h"
-#include "opj_inttypes.h"
#ifdef SERVER
#include "fcgi_stdio.h"
diff --git a/src/lib/openjpip/msgqueue_manager.c b/src/lib/openjpip/msgqueue_manager.c
index c6596271..5f939a95 100644
--- a/src/lib/openjpip/msgqueue_manager.c
+++ b/src/lib/openjpip/msgqueue_manager.c
@@ -37,6 +37,7 @@
#include <ctype.h>
#include <assert.h>
#include <limits.h>
+#include <inttypes.h>
#ifdef _WIN32
#include <io.h>
#else
@@ -45,7 +46,6 @@
#include "msgqueue_manager.h"
#include "metadata_manager.h"
#include "index_manager.h"
-#include "opj_inttypes.h"
#ifdef SERVER
#include "fcgi_stdio.h"
diff --git a/src/lib/openjpip/placeholder_manager.c b/src/lib/openjpip/placeholder_manager.c
index 2ffa2034..9d73567f 100644
--- a/src/lib/openjpip/placeholder_manager.c
+++ b/src/lib/openjpip/placeholder_manager.c
@@ -31,8 +31,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <inttypes.h>
#include "placeholder_manager.h"
-#include "opj_inttypes.h"
#ifdef SERVER
#include "fcgi_stdio.h"
diff --git a/src/lib/openjpip/query_parser.c b/src/lib/openjpip/query_parser.c
index 9b2fac2d..e192c73c 100644
--- a/src/lib/openjpip/query_parser.c
+++ b/src/lib/openjpip/query_parser.c
@@ -42,8 +42,8 @@
#include <assert.h>
#include <string.h>
#include <stdlib.h>
+#include <stdint.h>
#include "query_parser.h"
-#include "opj_stdint.h"
#ifdef SERVER
#include "fcgi_stdio.h"
diff --git a/src/lib/openjpip/sock_manager.h b/src/lib/openjpip/sock_manager.h
index 01d97574..f33306c0 100644
--- a/src/lib/openjpip/sock_manager.h
+++ b/src/lib/openjpip/sock_manager.h
@@ -32,7 +32,7 @@
# define SOCK_MANAGER_H_
#include "byte_manager.h"
-#include "opj_stdint.h"
+#include <stdint.h>
#ifdef _WIN32
#include <winsock.h>