summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2007-12-19 13:57:57 +0000
committerFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2007-12-19 13:57:57 +0000
commit5f995bcf4b6665c58b646056785ad649955b08d8 (patch)
tree725b2d8b1a3e96de09c1cb65e2b4bffb0b31b183
parent64ed560f4f88cb7215adb011ba53f16f1fd3f54c (diff)
Fixed allocation problem in pi.c
-rw-r--r--ChangeLog1
-rw-r--r--libopenjpeg/pi.c3
2 files changed, 2 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index eeafa865..96f30797 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@ What's New for OpenJPEG
December 19, 2007
! [Parvatha] In pi.c, removed the Recursive function pi_check_next_level() and modified the code.
+* [FOD] Fixed allocation problem in pi.c
December 19, 2007
+ [FOD] In mqc.h, changed MQC_NUMCTXS from 32 to 19 as there are only 19 possible contexts
diff --git a/libopenjpeg/pi.c b/libopenjpeg/pi.c
index 7bd571ea..45de9031 100644
--- a/libopenjpeg/pi.c
+++ b/libopenjpeg/pi.c
@@ -727,7 +727,7 @@ bool pi_next(opj_pi_iterator_t * pi) {
}
void pi_create_encode( opj_pi_iterator_t *pi, opj_cp_t *cp,int tileno, int pino,int tpnum, int tppos, J2K_T2_MODE t2_mode,int cur_totnum_tp){
- char *prog;
+ char prog[4];
int i;
int incr_top=1,resetX=0;
opj_tcp_t *tcps =&cp->tcps[tileno];
@@ -735,7 +735,6 @@ void pi_create_encode( opj_pi_iterator_t *pi, opj_cp_t *cp,int tileno, int pino,
pi[pino].first = 1;
pi[pino].poc.prg = tcp->prg;
- prog = (char*)malloc(4*sizeof(char));
switch(tcp->prg){
case CPRL: strncpy(prog, "CPRL",4);