summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pwdx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pwdx.c b/pwdx.c
index cb96a52..bda1bf1 100644
--- a/pwdx.c
+++ b/pwdx.c
@@ -60,6 +60,7 @@ int main(int argc, char* argv[])
for (i = 1; i < argc; i++) {
if (regexec(&re, argv[i], 0, NULL, 0) != 0) {
snprintf(buf, sizeof buf, "pwdx: invalid process id: %s\n", argv[i]);
+ buf[sizeof(buf)-1] = '\0';
die(buf);
}
if (!strcmp("-V", argv[i]) || !strcmp("--version", argv[i]))