summaryrefslogtreecommitdiff
path: root/gnu/lib/libreadline/histexpand.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2003-05-14 04:16:06 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2003-05-14 04:16:06 +0000
commit884b94759999756ef7800773653660f27915ca96 (patch)
tree48e10d08e6779b9bccde45bfa717ce6423cf556c /gnu/lib/libreadline/histexpand.c
parentbeb2ab13d49e1b36e620b36584d16eca556cb326 (diff)
correct bound length and make sure string is always nul'd
fixes problem found by markus@
Diffstat (limited to 'gnu/lib/libreadline/histexpand.c')
-rw-r--r--gnu/lib/libreadline/histexpand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/lib/libreadline/histexpand.c b/gnu/lib/libreadline/histexpand.c
index 4c42a213c0e..30c8f913379 100644
--- a/gnu/lib/libreadline/histexpand.c
+++ b/gnu/lib/libreadline/histexpand.c
@@ -847,7 +847,7 @@ history_expand (hstring, output)
string[0] = string[1] = history_expansion_char;
string[2] = ':';
string[3] = 's';
- strlcpy (string + 4, hstring, l - 4);
+ strlcpy (string + 4, hstring, l + 1);
l += 4;
}
else