Skip to content

Commit

Permalink
Merge pull request #911 from MartinNowack/fix_compiler_errors
Browse files Browse the repository at this point in the history
Fix compiler error under MacOS about unsafe usage of `sprintf`.
  • Loading branch information
yuleisui authored Nov 16, 2022
2 parents 0712e63 + 66832fd commit 3d54728
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/MSSA/MemRegion.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class MemRegion
ii != ie; ii++)
{
char int2str[16];
sprintf(int2str, "%d", *ii);
snprintf(int2str, sizeof(int2str), "%d", *ii);
str += int2str;
str += " ";
}
Expand Down
2 changes: 1 addition & 1 deletion include/MemoryModel/ConditionalPT.h
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ class CondPointsToSet
ii != ie; ii++)
{
char int2str[16];
sprintf(int2str, "%d", *ii);
snprintf(int2str, sizeof(int2str), "%d", *ii);
str += int2str;
str += " ";
}
Expand Down

0 comments on commit 3d54728

Please sign in to comment.