diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/dpfp.c | 2 | ||||
-rw-r--r-- | examples/dpfp_threaded.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/dpfp.c b/examples/dpfp.c index 7652407..55daff8 100644 --- a/examples/dpfp.c +++ b/examples/dpfp.c @@ -226,7 +226,7 @@ static int save_to_file(unsigned char *data) FILE *fd; char filename[64]; - sprintf(filename, "finger%d.pgm", img_idx++); + snprintf(filename, sizeof(filename), "finger%d.pgm", img_idx++); fd = fopen(filename, "w"); if (!fd) return -1; diff --git a/examples/dpfp_threaded.c b/examples/dpfp_threaded.c index a46d885..a0557c2 100644 --- a/examples/dpfp_threaded.c +++ b/examples/dpfp_threaded.c @@ -255,7 +255,7 @@ static int save_to_file(unsigned char *data) FILE *fd; char filename[64]; - sprintf(filename, "finger%d.pgm", img_idx++); + snprintf(filename, sizeof(filename), "finger%d.pgm", img_idx++); fd = fopen(filename, "w"); if (!fd) return -1; |