summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorTomas Heinrich2010-04-16 23:59:51 +0200
committerDenys Vlasenko2010-04-16 16:26:08 -0700
commit0358daf44742385f2eac355cd2605a1993628343 (patch)
treecd6a94c6ad1d5022aa628dd3786d5cdc6acccf10 /libbb
parent36dcf4e516baac2aa454badc0686c4212dc997fe (diff)
downloadbusybox-0358daf44742385f2eac355cd2605a1993628343.zip
busybox-0358daf44742385f2eac355cd2605a1993628343.tar.gz
read_key: fix buffer length calculation
Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r--libbb/read_key.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/read_key.c b/libbb/read_key.c
index 0faa12c..8422976 100644
--- a/libbb/read_key.c
+++ b/libbb/read_key.c
@@ -264,5 +264,5 @@ void FAST_FUNC read_key_ungets(char *buffer, const char *str, unsigned len)
if (len > KEYCODE_BUFFER_SIZE-1 - cur_len)
len = KEYCODE_BUFFER_SIZE-1 - cur_len;
memcpy(buffer + 1 + cur_len, str, len);
- buffer[0] += cur_len + len;
+ buffer[0] += len;
}