Skip to content

Commit

Permalink
avoid potential sprintf overflow (GCC7)
Browse files Browse the repository at this point in the history
  • Loading branch information
msmeissn committed Jun 1, 2017
1 parent 6aaa8da commit 72de262
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion camlibs/sonix/library.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ camera_capture (Camera *camera, CameraCaptureType type, CameraFilePath *path,
n=camera->pl->num_pics;
sonix_capture_image(camera->port);
snprintf(name, 16, "sonix%03i.ppm",n+1);
snprintf(path->folder,1,"/");
sprintf(path->folder,"/");
snprintf(path->name,16,"sonix%03i.ppm",n+1);
gp_filesystem_append(camera->fs, "/", name, context);
return GP_OK;
Expand Down

0 comments on commit 72de262

Please sign in to comment.