Trace Parser: ignore buffer of 0 size 35/161235/12
authorAlexander Aksenov <a.aksenov@samsung.com>
Tue, 21 Nov 2017 19:11:48 +0000 (22:11 +0300)
committerAlexander Aksenov <a.aksenov@samsung.com>
Tue, 28 Nov 2017 15:34:57 +0000 (18:34 +0300)
Change-Id: Ic2361af3e640e93f22afb66405263257c3fc9410
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
src/cli/trace_parser/lib/protocol30.cpp

index 91ac092..afa055a 100644 (file)
@@ -446,7 +446,8 @@ void Protocol30::parse_fbi(Buffer &buf) const
     len = buf.get_val<uint32_t>();
     writer_->output_val("size", len);
 
-    writer_->output_buf(buf.get_buf(len));
+    if (len)
+        writer_->output_buf(buf.get_buf(len));
 }
 
 void Protocol30::parse_context_switch_entry(Buffer &buf) const
@@ -616,7 +617,8 @@ void Protocol30::parse_probe_network(Buffer &buf) const
         len = SOCKET_SEND_SIZE;
     writer_->output_val("message", "");
 
-    writer_->output_buf(buf.get_buf(len));
+    if (len)
+        writer_->output_buf(buf.get_buf(len));
 }
 
 void Protocol30::parse_probe_gl(Buffer &buf) const