|
|
a9f19d |
From 871a0636a3f624d504e284da2336c75dd635d587 Mon Sep 17 00:00:00 2001
|
|
|
a9f19d |
From: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
a9f19d |
Date: Tue, 9 Oct 2018 15:14:19 +0100
|
|
|
a9f19d |
Subject: [PATCH 6/6] avoid truncation when logging message that includes
|
|
|
a9f19d |
target name
|
|
|
a9f19d |
|
|
|
a9f19d |
RH-Author: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
a9f19d |
Message-id: <20181009151419.20418-7-pbonzini@redhat.com>
|
|
|
a9f19d |
Patchwork-id: 82507
|
|
|
a9f19d |
O-Subject: [RHEL8 libiscsi PATCH 6/6] avoid truncation when logging message that includes target name
|
|
|
a9f19d |
Bugzilla: 1634541
|
|
|
a9f19d |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
a9f19d |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
a9f19d |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
a9f19d |
|
|
|
a9f19d |
Avoid truncation warning from GCC 8.
|
|
|
a9f19d |
|
|
|
a9f19d |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
a9f19d |
(cherry picked from commit bffafc1c3003c2ee05d28eaa345e5854bc36014d)
|
|
|
a9f19d |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
a9f19d |
---
|
|
|
a9f19d |
lib/logging.c | 4 ++--
|
|
|
a9f19d |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
a9f19d |
|
|
|
a9f19d |
diff --git a/lib/logging.c b/lib/logging.c
|
|
|
a9f19d |
index bc31f24..727860b 100644
|
|
|
a9f19d |
--- a/lib/logging.c
|
|
|
a9f19d |
+++ b/lib/logging.c
|
|
|
a9f19d |
@@ -73,9 +73,9 @@ iscsi_log_message(struct iscsi_context *iscsi, int level, const char *format, ..
|
|
|
a9f19d |
}
|
|
|
a9f19d |
|
|
|
a9f19d |
if (iscsi->target_name[0]) {
|
|
|
a9f19d |
- static char message2[1024];
|
|
|
a9f19d |
+ static char message2[1282];
|
|
|
a9f19d |
|
|
|
a9f19d |
- snprintf(message2, 1024, "%s [%s]", message, iscsi->target_name);
|
|
|
a9f19d |
+ snprintf(message2, 1282, "%s [%s]", message, iscsi->target_name);
|
|
|
a9f19d |
iscsi->log_fn(level, message2);
|
|
|
a9f19d |
}
|
|
|
a9f19d |
else
|
|
|
a9f19d |
--
|
|
|
a9f19d |
1.8.3.1
|
|
|
a9f19d |
|