Merge pull request #1101 from kbabioch/fix/jp3d-sprintf-overflow
jp3d: Replace sprintf() by snprintf() in volumetobin()
This commit is contained in:
commit
b02e0d9c4e
|
@ -788,7 +788,7 @@ int volumetobin(opj_volume_t * volume, char *outfile)
|
||||||
|
|
||||||
fclose(fdest);
|
fclose(fdest);
|
||||||
|
|
||||||
sprintf(name, "%s.img", outfile);
|
snprintf(name, sizeof(name), "%s.img", outfile);
|
||||||
fimgdest = fopen(name, "w");
|
fimgdest = fopen(name, "w");
|
||||||
if (!fimgdest) {
|
if (!fimgdest) {
|
||||||
fprintf(stdout, "[ERROR] Failed to open %s for writing\n", name);
|
fprintf(stdout, "[ERROR] Failed to open %s for writing\n", name);
|
||||||
|
|
Loading…
Reference in New Issue