summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2004-11-05 08:59:58 +0000
committerFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2004-11-05 08:59:58 +0000
commit3b600a986c4cd30e14b578b152d58d894c74d7a0 (patch)
tree51ed40e104b61cd1301bdf7b0c3f876f88ee3643
parent0d4a38f3a5032293fc7204ca3addf58062136b4e (diff)
Stack corruption error corrected with "tmp" variable
-rw-r--r--mj2/mj2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mj2/mj2.c b/mj2/mj2.c
index 90789ae3..4b2757f8 100644
--- a/mj2/mj2.c
+++ b/mj2/mj2.c
@@ -2885,10 +2885,10 @@ int mj2_encode(mj2_movie_t * movie, j2k_cp_t * cp, char *index)
fclose(outfile);
for (i = 0; i < movie->tk[0].jp2_struct.numcomps; i++) {
- char tmp;
- sprintf(&tmp, "Compo%d", i);
- if (remove(&tmp) == -1) {
- fprintf(stderr, "failed to kill %s file !\n", &tmp);
+ char tmp[20];
+ sprintf(tmp, "Compo%d", i);
+ if (remove(tmp) == -1) {
+ fprintf(stderr, "failed to kill %s file !\n", tmp);
}
}