summaryrefslogtreecommitdiff
path: root/base/hostinfo.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/hostinfo.cc')
-rw-r--r--base/hostinfo.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/base/hostinfo.cc b/base/hostinfo.cc
index cb5c04efc..6d07c957e 100644
--- a/base/hostinfo.cc
+++ b/base/hostinfo.cc
@@ -70,7 +70,7 @@ procInfo(char *filename, char *target)
while (fp && !feof(fp) && !done) {
if (fgets(line, 80, fp)) {
if (strncmp(line, target, strlen(target)) == 0) {
- sprintf(format, "%s %%lld", target);
+ snprintf(format, sizeof(format), "%s %%lld", target);
sscanf(line, format, &usage);
fclose(fp);