From 6e00588ebfe9441f793c304d42cf3c83463abe0c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 2 May 2018 20:54:56 +0300 Subject: Fix possible buffer overflow in common. --- src/common/sysinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/sysinfo.c') diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index 3c7e25a0c..0056aee1e 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -321,7 +321,7 @@ bool sysinfo_git_get_revision(char **out) while (*ref) { FILE *fp; - snprintf(filepath, sizeof(filepath), ".git/%s", ref); + safesnprintf(filepath, sizeof(filepath), ".git/%s", ref); if ((fp = fopen(filepath, "r")) != NULL) { if (fgets(line, sizeof(line)-1, fp) == NULL) { fclose(fp); -- cgit v1.2.3-60-g2f50