Commit fb39c176 authored by Ilya Lipnitskiy's avatar Ilya Lipnitskiy

protobuf-c/protobuf-c.c: add a few extra checks to

protobuf_c_message_check
parent 746ea972
......@@ -2625,6 +2625,10 @@ protobuf_c_message_init (const ProtobufCMessageDescriptor *descriptor,
protobuf_c_boolean protobuf_c_message_check (const ProtobufCMessage *message)
{
if (!message || !message->descriptor
|| message->descriptor->magic != PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC)
return FALSE;
unsigned f;
for (f = 0; f < message->descriptor->n_fields; f++)
{
......
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