mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2025-01-14 01:07:57 +08:00
Merge pull request #703 from smuellerDD/fix_corruption
protobuf_c_message_unpack(): Fix memory corruption by initializing unknown_fields pointer
This commit is contained in:
commit
5c13d7dfe9
@ -3278,6 +3278,8 @@ protobuf_c_message_unpack(const ProtobufCMessageDescriptor *desc,
|
||||
n_unknown * sizeof(ProtobufCMessageUnknownField));
|
||||
if (rv->unknown_fields == NULL)
|
||||
goto error_cleanup;
|
||||
} else {
|
||||
rv->unknown_fields = NULL;
|
||||
}
|
||||
|
||||
/* do real parsing */
|
||||
|
Loading…
x
Reference in New Issue
Block a user