Skip to content

Commit

Permalink
Changed various sprintf calls to snprintf.
Browse files Browse the repository at this point in the history
  • Loading branch information
acaudwell committed Mar 25, 2014
1 parent f099701 commit 54a16d1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/core
Submodule core updated 1 files
+7 −7 conffile.cpp
2 changes: 1 addition & 1 deletion src/formats/bzr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ BaseLog* BazaarLog::generateLog(const std::string& dir) {
if(temp_file.size()==0) return 0;

char cmd_buff[2048];
sprintf(cmd_buff, "%s %s > %s", command.c_str(), dir.c_str(), temp_file.c_str());
snprintf(cmd_buff, 2048, "%s %s > %s", command.c_str(), dir.c_str(), temp_file.c_str());

int command_rc = systemCommand(cmd_buff);

Expand Down
2 changes: 1 addition & 1 deletion src/formats/git.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ BaseLog* GitCommitLog::generateLog(const std::string& dir) {
}

char cmd_buff[2048];
sprintf(cmd_buff, "%s > %s", command.c_str(), temp_file.c_str());
snprintf(cmd_buff, 2048, "%s > %s", command.c_str(), temp_file.c_str());

int command_rc = systemCommand(cmd_buff);

Expand Down
2 changes: 1 addition & 1 deletion src/formats/hg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ BaseLog* MercurialLog::generateLog(const std::string& dir) {
if(temp_file.size()==0) return 0;

char cmd_buff[2048];
sprintf(cmd_buff, "%s -R \"%s\" > %s", command.c_str(), dir.c_str(), temp_file.c_str());
snprintf(cmd_buff, 2048, "%s -R \"%s\" > %s", command.c_str(), dir.c_str(), temp_file.c_str());

int command_rc = systemCommand(cmd_buff);

Expand Down
2 changes: 1 addition & 1 deletion src/formats/svn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ BaseLog* SVNCommitLog::generateLog(const std::string& dir) {
}

char cmd_buff[2048];
sprintf(cmd_buff, "%s > %s", command.c_str(), temp_file.c_str());
snprintf(cmd_buff, 2048, "%s > %s", command.c_str(), temp_file.c_str());

int command_rc = systemCommand(cmd_buff);

Expand Down

0 comments on commit 54a16d1

Please sign in to comment.