From 6f6c7973fc8aa2cab04b1758399e29e30e3a7eec Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Wed, 24 May 2017 09:17:31 +0100 Subject: [PATCH] Fix pointer bug in logging. --- src/dinit-log.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dinit-log.cc b/src/dinit-log.cc index e402f6b..7a8db58 100644 --- a/src/dinit-log.cc +++ b/src/dinit-log.cc @@ -194,7 +194,7 @@ rearm BufferedLogStream::fd_event(EventLoop_t &loop, int fd, int flags) noexcept // Do we need the second span? if (! will_complete && len != log_buffer.get_length()) { ptr = log_buffer.get_buf_base(); - creptr = static_cast(logiov[1].iov_base) + log_buffer.get_length() - len; + creptr = ptr + log_buffer.get_length() - len; eptr = std::find(ptr, creptr, '\n'); if (eptr != creptr) { eptr++; // include '\n' -- 2.25.1