Fix issue detected by static analysis tool 96/278696/1
authorInHong Han <inhong1.han@samsung.com>
Mon, 25 Jul 2022 06:56:18 +0000 (15:56 +0900)
committerInHong Han <inhong1.han@samsung.com>
Mon, 25 Jul 2022 06:56:18 +0000 (15:56 +0900)
Change-Id: Ibffc0c7afc0d4296a0ff5e9f0387d85ebee319dc

client/ma_dbus.c

index a63b0827ac6d8071921399993de197dc68225496..dd62350a0239cd5f7d2311b021e5deb468738f0d 100644 (file)
@@ -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);