You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2020/08/04 18:58:13 UTC

[qpid-dispatch] 27/32: Dataplane: Message parsing bug fixed: now properly handles empty var-length fields.

This is an automated email from the ASF dual-hosted git repository.

tross pushed a commit to branch dev-protocol-adaptors
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git

commit 3e2418e6712a38584cd787f0163d5cf120cbb077
Author: Ted Ross <tr...@apache.org>
AuthorDate: Thu Jul 9 15:49:52 2020 -0400

    Dataplane: Message parsing bug fixed: now properly handles empty var-length fields.
---
 src/message.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/message.c b/src/message.c
index 8228cd8..7f11e5e 100644
--- a/src/message.c
+++ b/src/message.c
@@ -694,7 +694,7 @@ static qd_section_status_t message_section_check(qd_buffer_t         **buffer,
         // uint8_t size field
         pre_consume += 1;
         consume |= (uint32_t) next_octet(&test_cursor, &test_buffer);
-        if (!test_cursor) return QD_SECTION_NEED_MORE;
+        if (!test_cursor && consume > 0) return QD_SECTION_NEED_MORE;
         break;
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org