summaryrefslogtreecommitdiff
path: root/src/common/sysinfo.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-05-06 17:52:22 +0200
committerGitHub <noreply@github.com>2018-05-06 17:52:22 +0200
commitb889108f6dea3e1765681b9eaf4a39a18c24eeec (patch)
tree40e2b55d2e4d1f4a38a0a36be7f9920dd9637ce4 /src/common/sysinfo.c
parentd6785d389cbee4f34078f6762626ca61b2d6cc25 (diff)
parented8fac40e2d6cbf11b9a4a1a8182cd28871e3e6d (diff)
downloadhercules-b889108f6dea3e1765681b9eaf4a39a18c24eeec.tar.gz
hercules-b889108f6dea3e1765681b9eaf4a39a18c24eeec.tar.bz2
hercules-b889108f6dea3e1765681b9eaf4a39a18c24eeec.tar.xz
hercules-b889108f6dea3e1765681b9eaf4a39a18c24eeec.zip
Merge pull request #2028 from 4144/warnings
Fix some possible buffer overflows.
Diffstat (limited to 'src/common/sysinfo.c')
-rw-r--r--src/common/sysinfo.c2
1 files changed, 1 insertions, 1 deletions
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);