diff options
author | Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> | 2022-01-10 05:00:00 +0000 |
---|---|---|
committer | Yixun Lan <dlan@gentoo.org> | 2022-01-29 23:18:08 +0800 |
commit | c9535bfd7ee3e7dc36ceed2084ba681ab574522e (patch) | |
tree | 02ed9e0f081f5b4adbcca9f811df8880a6d1ee4a /dev-python/protobuf-python/files | |
parent | dev-java/protobuf-java: Version bump (3.19.3). (diff) | |
download | gentoo-c9535bfd7ee3e7dc36ceed2084ba681ab574522e.tar.gz gentoo-c9535bfd7ee3e7dc36ceed2084ba681ab574522e.tar.bz2 gentoo-c9535bfd7ee3e7dc36ceed2084ba681ab574522e.zip |
dev-python/protobuf-python: Version bump (3.19.3).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
Diffstat (limited to 'dev-python/protobuf-python/files')
-rw-r--r-- | dev-python/protobuf-python/files/protobuf-python-3.19.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/dev-python/protobuf-python/files/protobuf-python-3.19.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch b/dev-python/protobuf-python/files/protobuf-python-3.19.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch new file mode 100644 index 000000000000..a9e23feea148 --- /dev/null +++ b/dev-python/protobuf-python/files/protobuf-python-3.19.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch @@ -0,0 +1,42 @@ +From 387c9e58987c54b72e66c14b34c98297086cd812 Mon Sep 17 00:00:00 2001 +From: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> +Date: Fri, 28 Jan 2022 15:32:43 +0800 +Subject: [PATCH] protobuf-python-3.19.0: + google.protobuf.pyext._message.PyUnknownFieldRef + +Prevent integer overflow for unknown fields. + +https://github.com/protocolbuffers/protobuf/issues/6205 +https://github.com/protocolbuffers/protobuf/pull/7016 +https://github.com/protocolbuffers/protobuf/commit/5100be2b7746391c2724e2793e1428c36b63c98b + +Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> +Signed-off-by: Yixun Lan <dlan@gentoo.org> +--- + python/google/protobuf/pyext/unknown_fields.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/python/google/protobuf/pyext/unknown_fields.cc b/python/google/protobuf/pyext/unknown_fields.cc +index 6d919b3..37e6eae 100644 +--- a/python/google/protobuf/pyext/unknown_fields.cc ++++ b/python/google/protobuf/pyext/unknown_fields.cc +@@ -275,13 +275,13 @@ static PyObject* GetData(PyUnknownFieldRef* self, void *closure) { + PyObject* data = NULL; + switch (field->type()) { + case UnknownField::TYPE_VARINT: +- data = PyLong_FromLong(field->varint()); ++ data = PyLong_FromUnsignedLongLong(field->varint()); + break; + case UnknownField::TYPE_FIXED32: +- data = PyLong_FromLong(field->fixed32()); ++ data = PyLong_FromUnsignedLong(field->fixed32()); + break; + case UnknownField::TYPE_FIXED64: +- data = PyLong_FromLong(field->fixed64()); ++ data = PyLong_FromUnsignedLongLong(field->fixed64()); + break; + case UnknownField::TYPE_LENGTH_DELIMITED: + data = PyBytes_FromStringAndSize(field->length_delimited().data(), +-- +2.34.1 + |