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);
|
||||
|
||||
sprintf(name, "%s.img", outfile);
|
||||
snprintf(name, sizeof(name), "%s.img", outfile);
|
||||
fimgdest = fopen(name, "w");
|
||||
if (!fimgdest) {
|
||||
fprintf(stdout, "[ERROR] Failed to open %s for writing\n", name);
|
||||
|
|
Loading…
Reference in New Issue