diff --git a/src/main.c b/src/main.c index 0f85dca21..108bde0a8 100644 --- a/src/main.c +++ b/src/main.c @@ -132,7 +132,7 @@ static bool parse_args(int argc, char **args) strlen(prog_basename) + 5 + 1); assert(prof_out_file); - sprintf(prof_out_file, "%s/%s%s.prof", cwd_path, rel_path, + snprintf(prof_out_file, sizeof(prof_out_file), "%s/%s%s.prof", cwd_path, rel_path, prog_basename); } return true;