diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2003-05-14 04:16:06 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2003-05-14 04:16:06 +0000 |
commit | 884b94759999756ef7800773653660f27915ca96 (patch) | |
tree | 48e10d08e6779b9bccde45bfa717ce6423cf556c /gnu/lib/libreadline/histexpand.c | |
parent | beb2ab13d49e1b36e620b36584d16eca556cb326 (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.c | 2 |
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 |