!32 【openEuler-24.03-LTS】Fix possible uninitialized variable

From: @yixiangzhike 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
This commit is contained in:
openeuler-ci-bot 2024-07-30 11:19:42 +00:00 committed by Gitee
commit 64149de652
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 40 additions and 1 deletions

View File

@ -0,0 +1,31 @@
From 75e94db38ccd9ed166b40fb2d8aaed7c094cff69 Mon Sep 17 00:00:00 2001
From: Jakub Jelen <jjelen@redhat.com>
Date: Mon, 12 Feb 2024 09:52:43 +0100
Subject: [PATCH] der-builder: Fix possible uninitialized variable.
* src/der-builder.c (_ksba_der_builder_get): Initialize ERR.
--
GnuPG-bug-id: 6992
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
---
src/der-builder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/der-builder.c b/src/der-builder.c
index 768bd0f..d136bb8 100644
--- a/src/der-builder.c
+++ b/src/der-builder.c
@@ -549,7 +549,7 @@ compute_lengths (ksba_der_t d, int idx)
gpg_error_t
_ksba_der_builder_get (ksba_der_t d, unsigned char **r_obj, size_t *r_objlen)
{
- gpg_error_t err;
+ gpg_error_t err = 0;
int idx;
unsigned char *buffer = NULL;
unsigned char *p;
--
2.33.0

View File

@ -1,12 +1,14 @@
Name: libksba
Version: 1.6.4
Release: 1
Release: 2
Summary: A library for X.509 and CMS
License: (LGPL-3.0+ or GPL-2.0+) and GPL-3.0+ and MIT
URL: https://www.gnupg.org/software/libksba/index.html
Source0: https://www.gnupg.org/ftp/gcrypt/libksba/libksba-%{version}.tar.bz2
Source1: https://www.gnupg.org/ftp/gcrypt/libksba/libksba-%{version}.tar.bz2.sig
Patch1: backport-der-builder-Fix-possible-uninitialized-variable.patch
BuildRequires: gcc gawk libgpg-error-devel >= 1.8 libgcrypt-devel >= 1.2.0
%description
@ -65,6 +67,12 @@ make check
%{_datadir}/info/ksba.info.gz
%changelog
* Tue Jul 30 2024 yixiangzhike <yixiangzhike007@163.com> - 1.6.4-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:backport upstream patch to fix possible uninitialized variable
* Tue Feb 27 2024 yixiangzhike <yixiangzhike007@163.com> - 1.6.4-1
- Type:enhancement
- ID:NA