From 9ef76ae5b02f129918ab4497be6c994d58235710 Mon Sep 17 00:00:00 2001 From: zhouganqing Date: Mon, 13 Feb 2023 17:29:03 +0800 Subject: [PATCH] format patches --- debian/patches/CVE-2022-33070.patch | 7 ++++--- debian/patches/misc-2022-null-deref.patch | 5 +++-- debian/patches/misc-2022-unsigned-integer.patch | 5 +++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/debian/patches/CVE-2022-33070.patch b/debian/patches/CVE-2022-33070.patch index 1e35917..0652a90 100644 --- a/debian/patches/CVE-2022-33070.patch +++ b/debian/patches/CVE-2022-33070.patch @@ -1,4 +1,3 @@ -From 6e389ce2c34355d36009a8fb1666bed29fa2d4f4 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 6 Jun 2022 13:57:38 -0600 Subject: [PATCH] Only shift unsigned values to avoid implementation-specific @@ -10,6 +9,8 @@ Subject: [PATCH] Only shift unsigned values to avoid implementation-specific protobuf-c/protobuf-c.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) +diff --git a/protobuf-c/protobuf-c.c b/protobuf-c/protobuf-c.c +index 8976e36..ca4130f 100644 --- a/protobuf-c/protobuf-c.c +++ b/protobuf-c/protobuf-c.c @@ -312,9 +312,8 @@ int32_size(int32_t v) @@ -36,7 +37,7 @@ Subject: [PATCH] Only shift unsigned values to avoid implementation-specific } /** -@@ -798,7 +796,8 @@ uint32_pack(uint32_t value, uint8_t *out +@@ -798,7 +796,8 @@ uint32_pack(uint32_t value, uint8_t *out) } /** @@ -46,7 +47,7 @@ Subject: [PATCH] Only shift unsigned values to avoid implementation-specific * Negative numbers are encoded as two's complement 64-bit integers. * * \param value -@@ -809,14 +808,14 @@ uint32_pack(uint32_t value, uint8_t *out +@@ -809,14 +808,14 @@ uint32_pack(uint32_t value, uint8_t *out) * Number of bytes written to `out`. */ static inline size_t diff --git a/debian/patches/misc-2022-null-deref.patch b/debian/patches/misc-2022-null-deref.patch index e018ebb..7e9053f 100644 --- a/debian/patches/misc-2022-null-deref.patch +++ b/debian/patches/misc-2022-null-deref.patch @@ -1,4 +1,3 @@ -From ab5f76a52bade28a2c025bd52c7847f033ca82f3 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 29 Jun 2022 11:18:16 -0600 Subject: [PATCH] Fix a clang analyzer 14 warning about a possible NULL deref. @@ -9,9 +8,11 @@ https://github.com/sudo-project/sudo/commit/bfc6249902d842626058e74074832930feaf protobuf-c/protobuf-c.c | 3 +++ 1 file changed, 3 insertions(+) +diff --git a/protobuf-c/protobuf-c.c b/protobuf-c/protobuf-c.c +index 96b5b38..7e4c2ce 100644 --- a/protobuf-c/protobuf-c.c +++ b/protobuf-c/protobuf-c.c -@@ -3224,6 +3224,9 @@ protobuf_c_message_unpack(const Protobuf +@@ -3224,6 +3224,9 @@ protobuf_c_message_unpack(const ProtobufCMessageDescriptor *desc, /* allocate space for repeated fields, also check that all required fields have been set */ for (f = 0; f < desc->n_fields; f++) { const ProtobufCFieldDescriptor *field = desc->fields + f; diff --git a/debian/patches/misc-2022-unsigned-integer.patch b/debian/patches/misc-2022-unsigned-integer.patch index afb8e1b..c80ad66 100644 --- a/debian/patches/misc-2022-unsigned-integer.patch +++ b/debian/patches/misc-2022-unsigned-integer.patch @@ -1,4 +1,3 @@ -From 289f5c18b195aa43d46a619d1188709abbfa9c82 Mon Sep 17 00:00:00 2001 From: 10054172 Date: Fri, 18 Mar 2022 12:42:57 -0400 Subject: [PATCH 1/2] Fix issue #499: unsigned integer overflow @@ -8,9 +7,11 @@ Signed-off-by: 10054172 protobuf-c/protobuf-c.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) +diff --git a/protobuf-c/protobuf-c.c b/protobuf-c/protobuf-c.c +index ca4130f..96b5b38 100644 --- a/protobuf-c/protobuf-c.c +++ b/protobuf-c/protobuf-c.c -@@ -2600,10 +2600,13 @@ parse_required_member(ScannedMember *sca +@@ -2600,10 +2600,13 @@ parse_required_member(ScannedMember *scanned_member, return FALSE; def_mess = scanned_member->field->default_value;