diff options
Diffstat (limited to 'main/jasper/CVE-2015-5203.patch')
-rw-r--r-- | main/jasper/CVE-2015-5203.patch | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/main/jasper/CVE-2015-5203.patch b/main/jasper/CVE-2015-5203.patch index 5bf53b36f7..e60e61adc8 100644 --- a/main/jasper/CVE-2015-5203.patch +++ b/main/jasper/CVE-2015-5203.patch @@ -101,98 +101,98 @@ addresses that by using size_t for buffer sizes. { unsigned char *buf; ---- a/src/libjasper/jpc/jpc_qmfb.c -+++ b/src/libjasper/jpc/jpc_qmfb.c -@@ -305,7 +305,7 @@ jpc_qmfb2d_t jpc_ns_qmfb2d = { +--- a/src/libjasper/mif/mif_cod.c ++++ b/src/libjasper/mif/mif_cod.c +@@ -107,7 +107,7 @@ static int mif_hdr_put(mif_hdr_t *hdr, j + static int mif_hdr_addcmpt(mif_hdr_t *hdr, int cmptno, mif_cmpt_t *cmpt); + static mif_cmpt_t *mif_cmpt_create(void); + static void mif_cmpt_destroy(mif_cmpt_t *cmpt); +-static char *mif_getline(jas_stream_t *jas_stream, char *buf, int bufsize); ++static char *mif_getline(jas_stream_t *jas_stream, char *buf, size_t bufsize); + static int mif_getc(jas_stream_t *in); + static mif_hdr_t *mif_makehdrfromimage(jas_image_t *image); + +@@ -658,7 +658,7 @@ static void mif_cmpt_destroy(mif_cmpt_t + * MIF parsing code. + \******************************************************************************/ + +-static char *mif_getline(jas_stream_t *stream, char *buf, int bufsize) ++static char *mif_getline(jas_stream_t *stream, char *buf, size_t bufsize) + { + int c; + char *bufptr; + +--- ./src/libjasper/jpc/jpc_qmfb.c.orig ++++ ./src/libjasper/jpc/jpc_qmfb.c +@@ -305,7 +305,7 @@ void jpc_qmfb_split_row(jpc_fix_t *a, int numcols, int parity) { - int bufsize = JPC_CEILDIVPOW2(numcols, 1); + size_t bufsize = JPC_CEILDIVPOW2(numcols, 1); - #if !defined(HAVE_VLA) jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE]; - #else -@@ -373,7 +373,7 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in + jpc_fix_t *buf = splitbuf; + register jpc_fix_t *srcptr; +@@ -365,7 +365,7 @@ int parity) { - int bufsize = JPC_CEILDIVPOW2(numrows, 1); + size_t bufsize = JPC_CEILDIVPOW2(numrows, 1); - #if !defined(HAVE_VLA) jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE]; - #else -@@ -441,7 +441,7 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a, + jpc_fix_t *buf = splitbuf; + register jpc_fix_t *srcptr; +@@ -425,7 +425,7 @@ int parity) { - int bufsize = JPC_CEILDIVPOW2(numrows, 1); + size_t bufsize = JPC_CEILDIVPOW2(numrows, 1); - #if !defined(HAVE_VLA) jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE * JPC_QMFB_COLGRPSIZE]; - #else -@@ -530,7 +530,7 @@ void jpc_qmfb_split_colres(jpc_fix_t *a, + jpc_fix_t *buf = splitbuf; + jpc_fix_t *srcptr; +@@ -506,7 +506,7 @@ int stride, int parity) { - int bufsize = JPC_CEILDIVPOW2(numrows, 1); + size_t bufsize = JPC_CEILDIVPOW2(numrows, 1); - #if !defined(HAVE_VLA) jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE * JPC_QMFB_COLGRPSIZE]; - #else -@@ -618,7 +618,7 @@ void jpc_qmfb_split_colres(jpc_fix_t *a, + jpc_fix_t *buf = splitbuf; + jpc_fix_t *srcptr; +@@ -586,7 +586,7 @@ void jpc_qmfb_join_row(jpc_fix_t *a, int numcols, int parity) { - int bufsize = JPC_CEILDIVPOW2(numcols, 1); + size_t bufsize = JPC_CEILDIVPOW2(numcols, 1); - #if !defined(HAVE_VLA) jpc_fix_t joinbuf[QMFB_JOINBUFSIZE]; - #else -@@ -683,7 +683,7 @@ void jpc_qmfb_join_col(jpc_fix_t *a, int + jpc_fix_t *buf = joinbuf; + register jpc_fix_t *srcptr; +@@ -643,7 +643,7 @@ int parity) { - int bufsize = JPC_CEILDIVPOW2(numrows, 1); + size_t bufsize = JPC_CEILDIVPOW2(numrows, 1); - #if !defined(HAVE_VLA) jpc_fix_t joinbuf[QMFB_JOINBUFSIZE]; - #else -@@ -748,7 +748,7 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a, + jpc_fix_t *buf = joinbuf; + register jpc_fix_t *srcptr; +@@ -700,7 +700,7 @@ int parity) { - int bufsize = JPC_CEILDIVPOW2(numrows, 1); + size_t bufsize = JPC_CEILDIVPOW2(numrows, 1); - #if !defined(HAVE_VLA) jpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE]; - #else -@@ -834,7 +834,7 @@ void jpc_qmfb_join_colres(jpc_fix_t *a, + jpc_fix_t *buf = joinbuf; + jpc_fix_t *srcptr; +@@ -778,7 +778,7 @@ int stride, int parity) { - int bufsize = JPC_CEILDIVPOW2(numrows, 1); + size_t bufsize = JPC_CEILDIVPOW2(numrows, 1); - #if !defined(HAVE_VLA) jpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE]; - #else ---- a/src/libjasper/mif/mif_cod.c -+++ b/src/libjasper/mif/mif_cod.c -@@ -107,7 +107,7 @@ static int mif_hdr_put(mif_hdr_t *hdr, j - static int mif_hdr_addcmpt(mif_hdr_t *hdr, int cmptno, mif_cmpt_t *cmpt); - static mif_cmpt_t *mif_cmpt_create(void); - static void mif_cmpt_destroy(mif_cmpt_t *cmpt); --static char *mif_getline(jas_stream_t *jas_stream, char *buf, int bufsize); -+static char *mif_getline(jas_stream_t *jas_stream, char *buf, size_t bufsize); - static int mif_getc(jas_stream_t *in); - static mif_hdr_t *mif_makehdrfromimage(jas_image_t *image); - -@@ -658,7 +658,7 @@ static void mif_cmpt_destroy(mif_cmpt_t - * MIF parsing code. - \******************************************************************************/ - --static char *mif_getline(jas_stream_t *stream, char *buf, int bufsize) -+static char *mif_getline(jas_stream_t *stream, char *buf, size_t bufsize) - { - int c; - char *bufptr; - + jpc_fix_t *buf = joinbuf; + jpc_fix_t *srcptr; |