Stack corruption error corrected with "tmp" variable

This commit is contained in:
Francois-Olivier Devaux 2004-11-05 08:59:58 +00:00
parent 0d4a38f3a5
commit 3b600a986c

View File

@ -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);
}
}