summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/android/logger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/android/logger.c b/drivers/staging/android/logger.c
index 8988e4b61980..fb6afb3f8dc6 100644
--- a/drivers/staging/android/logger.c
+++ b/drivers/staging/android/logger.c
@@ -531,7 +531,7 @@ static void write_log_data(struct logger_log *log,
/* message */
len = min(chunk_len, log->size - w_off);
- memcpy(log->buffer + w_off, writer->buffer, chunk_len);
+ memcpy(log->buffer + w_off, writer->buffer, len);
memcpy(log->buffer, writer->buffer + len, chunk_len - len);
log->w_off = logger_offset(log, w_off + chunk_len);
}