Projects
openEuler:22.03:LTS:LoongArch
libgcrypt
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 7
View file
_service:tar_scm_kernel_repo:libgcrypt.spec
Changed
@@ -4,7 +4,7 @@ Name: libgcrypt Version: 1.9.4 -Release: 3 +Release: 4 Summary: A general-purpose cryptography library License: LGPLv2+ URL: https://www.gnupg.org/ @@ -26,6 +26,7 @@ Patch12: backport-libgcrypt-1.8.5-fips-module.patch Patch13: backport-Fix-the-behavior-for-child-process.patch Patch14: backport-Clear-AESWRAP-scratch-area-immediately-after-use.patch +Patch15: backport-mpi-Allow-opaque-MPI-with-zero-length.patch BuildRequires: gcc texinfo autoconf automake libtool BuildRequires: gawk libgpg-error-devel >= 1.11 pkgconfig @@ -133,6 +134,12 @@ %{_infodir}/gcrypt.info* %changelog +* Mon Jun 19 2023 zhengxiaoxiao <zhengxiaoxiao2@huawei.com> - 1.9.4-4 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:add backport-mpi-Allow-opaque-MPI-with-zero-length.patch + * Mon Nov 14 2022 zhengxiaoxiao <zhengxiaoxiao2@huawei.com> - 1.9.4-3 - Type:bugfix - ID:NA
View file
_service:tar_scm_kernel_repo:backport-mpi-Allow-opaque-MPI-with-zero-length.patch
Added
@@ -0,0 +1,42 @@ +From 7f2fbbcdce46fbc52a634fa461b1e3b55aa5948b Mon Sep 17 00:00:00 2001 +From: NIIBE Yutaka <gniibe@fsij.org> +Date: Fri, 29 Oct 2021 12:59:04 +0900 +Subject: [PATCH] mpi: Allow opaque MPI with zero length. + +* mpi/mpiutil.c (_gcry_mpi_copy): Support zero length. + +-- + +Cherry-pick master commit of: + 34d55589b7d91a239435d77e3d45cf0deeba59b6 + +Signed-off-by: NIIBE Yutaka <gniibe@fsij.org> + +--- + mpi/mpiutil.c | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/mpi/mpiutil.c b/mpi/mpiutil.c +index 5320f4d8..337e7747 100644 +--- a/mpi/mpiutil.c ++++ b/mpi/mpiutil.c +@@ -366,10 +366,13 @@ _gcry_mpi_copy (gcry_mpi_t a) + gcry_mpi_t b; + + if( a && (a->flags & 4) ) { +- void *p = _gcry_is_secure(a->d)? xmalloc_secure ((a->sign+7)/8) +- : xmalloc ((a->sign+7)/8); +- if (a->d) +- memcpy( p, a->d, (a->sign+7)/8 ); ++ void *p = NULL; ++ if (a->sign) { ++ p = _gcry_is_secure(a->d)? xmalloc_secure ((a->sign+7)/8) ++ : xmalloc ((a->sign+7)/8); ++ if (a->d) ++ memcpy( p, a->d, (a->sign+7)/8 ); ++ } + b = mpi_set_opaque( NULL, p, a->sign ); + b->flags = a->flags; + b->flags &= ~(16|32); /* Reset the immutable and constant flags. */ +-- +2.23.0 \ No newline at end of file
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.