format patches

This commit is contained in:
zhouganqing 2023-02-13 17:29:03 +08:00
parent a6c01c6369
commit 9ef76ae5b0
3 changed files with 10 additions and 7 deletions

View File

@ -1,4 +1,3 @@
From 6e389ce2c34355d36009a8fb1666bed29fa2d4f4 Mon Sep 17 00:00:00 2001
From: "Todd C. Miller" <Todd.Miller@sudo.ws> From: "Todd C. Miller" <Todd.Miller@sudo.ws>
Date: Mon, 6 Jun 2022 13:57:38 -0600 Date: Mon, 6 Jun 2022 13:57:38 -0600
Subject: [PATCH] Only shift unsigned values to avoid implementation-specific 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 +++++++++++------------ protobuf-c/protobuf-c.c | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-) 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 --- a/protobuf-c/protobuf-c.c
+++ b/protobuf-c/protobuf-c.c +++ b/protobuf-c/protobuf-c.c
@@ -312,9 +312,8 @@ int32_size(int32_t v) @@ -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. * Negative numbers are encoded as two's complement 64-bit integers.
* *
* \param value * \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`. * Number of bytes written to `out`.
*/ */
static inline size_t static inline size_t

View File

@ -1,4 +1,3 @@
From ab5f76a52bade28a2c025bd52c7847f033ca82f3 Mon Sep 17 00:00:00 2001
From: "Todd C. Miller" <Todd.Miller@sudo.ws> From: "Todd C. Miller" <Todd.Miller@sudo.ws>
Date: Wed, 29 Jun 2022 11:18:16 -0600 Date: Wed, 29 Jun 2022 11:18:16 -0600
Subject: [PATCH] Fix a clang analyzer 14 warning about a possible NULL deref. 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 +++ protobuf-c/protobuf-c.c | 3 +++
1 file changed, 3 insertions(+) 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 --- a/protobuf-c/protobuf-c.c
+++ b/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 */ /* allocate space for repeated fields, also check that all required fields have been set */
for (f = 0; f < desc->n_fields; f++) { for (f = 0; f < desc->n_fields; f++) {
const ProtobufCFieldDescriptor *field = desc->fields + f; const ProtobufCFieldDescriptor *field = desc->fields + f;

View File

@ -1,4 +1,3 @@
From 289f5c18b195aa43d46a619d1188709abbfa9c82 Mon Sep 17 00:00:00 2001
From: 10054172 <hui.zhang@thalesgroup.com> From: 10054172 <hui.zhang@thalesgroup.com>
Date: Fri, 18 Mar 2022 12:42:57 -0400 Date: Fri, 18 Mar 2022 12:42:57 -0400
Subject: [PATCH 1/2] Fix issue #499: unsigned integer overflow Subject: [PATCH 1/2] Fix issue #499: unsigned integer overflow
@ -8,9 +7,11 @@ Signed-off-by: 10054172 <hui.zhang@thalesgroup.com>
protobuf-c/protobuf-c.c | 11 +++++++---- protobuf-c/protobuf-c.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-) 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 --- a/protobuf-c/protobuf-c.c
+++ b/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; return FALSE;
def_mess = scanned_member->field->default_value; def_mess = scanned_member->field->default_value;