summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Heinrich <heinrich.tomas@gmail.com>2010-04-16 21:59:51 (GMT)
committer Denys Vlasenko <vda.linux@googlemail.com>2010-04-16 23:26:08 (GMT)
commit0358daf44742385f2eac355cd2605a1993628343 (patch)
treecd6a94c6ad1d5022aa628dd3786d5cdc6acccf10
parent36dcf4e516baac2aa454badc0686c4212dc997fe (diff)
downloadbusybox-0358daf44742385f2eac355cd2605a1993628343.tar.gz
busybox-0358daf44742385f2eac355cd2605a1993628343.tar.bz2
read_key: fix buffer length calculation
Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-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;
}