diff --git a/LICENSE.md b/LICENSE.md index 8c61f3728..07c91799d 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -319,7 +319,7 @@ The embedded copy of zlib bears the following license: The embedded copy of protobuf-c bears the following license: - Copyright (c) 2008-2018, Dave Benson and the protobuf-c authors. + Copyright (c) 2008-2022, Dave Benson and the protobuf-c authors. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/include/protobuf-c/protobuf-c.h b/include/protobuf-c/protobuf-c.h index 71c928fdb..442abf61d 100644 --- a/include/protobuf-c/protobuf-c.h +++ b/include/protobuf-c/protobuf-c.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008-2018, Dave Benson and the protobuf-c authors. + * Copyright (c) 2008-2022, Dave Benson and the protobuf-c authors. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -794,13 +794,13 @@ protobuf_c_version_number(void); * The version of the protobuf-c headers, represented as a string using the same * format as protobuf_c_version(). */ -#define PROTOBUF_C_VERSION "1.4.0" +#define PROTOBUF_C_VERSION "1.4.1" /** * The version of the protobuf-c headers, represented as an integer using the * same format as protobuf_c_version_number(). */ -#define PROTOBUF_C_VERSION_NUMBER 1004000 +#define PROTOBUF_C_VERSION_NUMBER 1004001 /** * The minimum protoc-c version which works with the current version of the diff --git a/lib/protobuf-c/protobuf-c.c b/lib/protobuf-c/protobuf-c.c index 9ee355df5..56f8dc8f1 100644 --- a/lib/protobuf-c/protobuf-c.c +++ b/lib/protobuf-c/protobuf-c.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008-2015, Dave Benson and the protobuf-c authors. + * Copyright (c) 2008-2022, Dave Benson and the protobuf-c authors. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -2618,14 +2618,14 @@ parse_required_member(ScannedMember *scanned_member, return FALSE; def_mess = scanned_member->field->default_value; - if (len >= pref_len) { + if (len >= pref_len) subm = protobuf_c_message_unpack(scanned_member->field->descriptor, allocator, len - pref_len, data + pref_len); - } else { + else subm = NULL; - } + if (maybe_clear && *pmessage != NULL && *pmessage != def_mess)