* src/util/logging.c: the start pointer need to wrap around too

Signed-off-by: Daniel Veillard <veill...@redhat.com>
---
 src/util/logging.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/util/logging.c b/src/util/logging.c
index 33b0992..b946285 100644
--- a/src/util/logging.c
+++ b/src/util/logging.c
@@ -271,6 +271,8 @@ static void virLogStr(const char *str, int len) {
         tmp = virLogLen - LOG_BUFFER_SIZE;
         virLogLen = LOG_BUFFER_SIZE;
         virLogStart += tmp;
+        if (virLogStart >= LOG_BUFFER_SIZE)
+            virLogStart -= LOG_BUFFER_SIZE;
     }
     virLogUnlock();
 }
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to