27 lines
834 B
Diff
27 lines
834 B
Diff
|
|
From b6a6451482a3ff5e30f43ef888159d4b0d39143b Mon Sep 17 00:00:00 2001
|
||
|
|
From: "Todd C. Miller" <Todd.Miller@sudo.ws>
|
||
|
|
Date: Thu, 9 Jun 2022 07:34:55 -0600
|
||
|
|
Subject: [PATCH] Fix regression with zero-length messages introduced in
|
||
|
|
protobuf-c PR 500.
|
||
|
|
|
||
|
|
---
|
||
|
|
lib/protobuf-c/protobuf-c.c | 2 +-
|
||
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
|
||
|
|
diff --git a/lib/protobuf-c/protobuf-c.c b/lib/protobuf-c/protobuf-c.c
|
||
|
|
index 9d56e1fec..3cc22c5f0 100644
|
||
|
|
--- a/lib/protobuf-c/protobuf-c.c
|
||
|
|
+++ b/lib/protobuf-c/protobuf-c.c
|
||
|
|
@@ -2618,7 +2618,7 @@ 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,
|
||
|
|
--
|
||
|
|
2.33.0
|
||
|
|
|