Skip to content

Commit

Permalink
Replace sprintf with snprintf to quiet some deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mn200 committed May 11, 2023
1 parent 81d4db3 commit 63a4c9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HolSat/sat_solvers/minisat/Global.h
Expand Up @@ -119,7 +119,7 @@ static inline int memReadStat(int field)
{
char name[256];
pid_t pid = getpid();
sprintf(name, "/proc/%d/statm", pid);
snprintf(name, 200, "/proc/%d/statm", pid);
FILE* in = fopen(name, "rb");
if (in == NULL) return 0;
int value;
Expand Down

0 comments on commit 63a4c9c

Please sign in to comment.