Skip to content

Commit

Permalink
Merge pull request #1101 from kbabioch/fix/jp3d-sprintf-overflow
Browse files Browse the repository at this point in the history
jp3d: Replace sprintf() by snprintf() in volumetobin()
  • Loading branch information
rouault authored Mar 4, 2018
2 parents 564fbfb + e351c22 commit b02e0d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bin/jp3d/convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b02e0d9

Please sign in to comment.