summaryrefslogtreecommitdiff
path: root/src/util.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2015-02-23 09:11:56 +0100
committerBardur Arantsson <bardur@scientician.net>2015-02-23 09:11:56 +0100
commit21662efacea883135f3a7cf67defe32ab872055a (patch)
tree3e49d22d99d03d4703ff9c0d61689b05f1d8924d /src/util.cc
parent346facaf00dc40001da8274df86a9094d509802b (diff)
Fix buffer overflow in askfor_aux()
Diffstat (limited to 'src/util.cc')
-rw-r--r--src/util.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.cc b/src/util.cc
index 550fc9e4..a9769d31 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -2458,7 +2458,7 @@ bool_ askfor_aux(char *buf, int len)
/* Paranoia -- Clip the default entry */
- buf[len] = '\0';
+ buf[len - 1] = '\0';
/* Display the default answer */