diff options
-rw-r--r-- | text-utils/more.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/text-utils/more.c b/text-utils/more.c index 33771183c..9af15b3ff 100644 --- a/text-utils/more.c +++ b/text-utils/more.c @@ -912,7 +912,8 @@ int get_line(register FILE *f, int *length) Fseek(f, file_pos_bak); break_flag = 1; } else { - for (i = 0; i < mbc_pos; i++) + for (i = 0; p < &Line[LineLen - 1] && + i < mbc_pos; i++) *p++ = mbc[i]; if (wc_width > 0) column += wc_width; |