Skip to content

Commit

Permalink
replace deprecated sprintf with snprintf
Browse files Browse the repository at this point in the history
  • Loading branch information
Harun Mustafa committed Feb 3, 2023
1 parent 2a82408 commit a457188
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/sdsl/int_vector_mapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ class temp_file_buffer
throw std::runtime_error("could not create temporary file.");
}
#else
sprintf(tmp_file_name, "%s/tmp_mapper_file_%lu_XXXXXX.sdsl",dir.c_str(),util::pid());
snprintf(tmp_file_name, 1024, "%s/tmp_mapper_file_%lu_XXXXXX.sdsl",dir.c_str(),util::pid());
int fd = mkstemps(tmp_file_name,5);
if (fd == -1) {
throw std::runtime_error("could not create temporary file.");
Expand Down

0 comments on commit a457188

Please sign in to comment.