Commit 596352bb authored by Robert Edmonds's avatar Robert Edmonds

protobuf_c_message_unpack(): initialize tmp.length_prefix_len

this should silence Coverity #1153648, which complains because
tmp.length_prefix_len is uninitialized for certain wire types when
copied on line 2486:

    scanned_member_slabs[which_slab][in_slab_index++] = tmp;
parent ac71dd58
...@@ -2411,6 +2411,7 @@ protobuf_c_message_unpack(const ProtobufCMessageDescriptor *desc, ...@@ -2411,6 +2411,7 @@ protobuf_c_message_unpack(const ProtobufCMessageDescriptor *desc,
tmp.wire_type = wire_type; tmp.wire_type = wire_type;
tmp.field = field; tmp.field = field;
tmp.data = at; tmp.data = at;
tmp.length_prefix_len = 0;
switch (wire_type) { switch (wire_type) {
case PROTOBUF_C_WIRE_TYPE_VARINT: { case PROTOBUF_C_WIRE_TYPE_VARINT: {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment