1 From e500cd364086cfc018b100d08c97b2fdf229d029 Mon Sep 17 00:00:00 2001
2 From: =?utf-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= <arve@android.com>
3 Date: Mon, 14 Apr 2008 21:35:25 -0700
4 Subject: [PATCH 110/134] printk: Fix log_buf_copy termination.
6 If idx was non-zero and the log had wrapped, len did not get truncated
7 to stop at the last byte written to the log.
9 kernel/printk.c | 4 ++--
10 1 files changed, 2 insertions(+), 2 deletions(-)
14 @@ -279,8 +279,8 @@ int log_buf_copy(char *dest, int idx, in
15 if (idx < 0 || idx >= max) {
20 + if (len > max - idx)
23 idx += (log_end - max);