From 8342395ca4b40d50619c0ed7fb49fb38dfb15af7 Mon Sep 17 00:00:00 2001 From: InHong Han Date: Mon, 25 Jul 2022 15:56:18 +0900 Subject: [PATCH] Fix issue detected by static analysis tool Change-Id: Ibffc0c7afc0d4296a0ff5e9f0387d85ebee319dc --- client/ma_dbus.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/ma_dbus.c b/client/ma_dbus.c index a63b082..dd62350 100644 --- a/client/ma_dbus.c +++ b/client/ma_dbus.c @@ -85,8 +85,12 @@ static void message_port_cb(int local_port_id, MA_SLOGE("[ERROR] bundle contains data bigger than %d : %zu", STREAMING_BUFFER_SIZE, size); //LCOV_EXCL_LINE return; } else { - if (v) + if (v) { memcpy(buffer, v, size); + } else { + MA_SLOGE("[ERROR] fail to get content"); + return; + } } memcpy(pending_buffer + pending_buffer_size, buffer, size); -- 2.34.1