Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
libksba
0006-Fix-an-undefined-return-value-in-ksba_cert...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0006-Fix-an-undefined-return-value-in-ksba_cert_get_diges.patch of Package libksba
From 3f74c2cc0068d0b3584627af73c8c42ce720a826 Mon Sep 17 00:00:00 2001 From: Werner Koch <wk@gnupg.org> Date: Tue, 3 May 2016 16:06:52 +0200 Subject: [PATCH 5/9] Fix an undefined return value in ksba_cert_get_digest_algo. * src/cert.c (ksba_cert_get_digest_algo): Set ALGO in the error case. * tests/cert-basic.c (one_file): Take care of printf which does not handle NULL for %s -- GnuPG-bug-id: 2343 Reported-by: Pascal Cuoq --- src/cert.c | 5 ++++- tests/cert-basic.c | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) Index: libksba-1.3.0/src/cert.c =================================================================== --- libksba-1.3.0.orig/src/cert.c +++ libksba-1.3.0/src/cert.c @@ -466,7 +466,10 @@ ksba_cert_get_digest_algo (ksba_cert_t c n = _ksba_asn_find_node (cert->root, "Certificate.signatureAlgorithm"); if (!n || n->off == -1) - err = gpg_error (GPG_ERR_UNKNOWN_ALGORITHM); + { + algo = NULL; + err = gpg_error (GPG_ERR_UNKNOWN_ALGORITHM); + } else err = _ksba_parse_algorithm_identifier (cert->image + n->off, n->nhdr + n->len, &nread, &algo); Index: libksba-1.3.0/tests/cert-basic.c =================================================================== --- libksba-1.3.0.orig/tests/cert-basic.c +++ libksba-1.3.0/tests/cert-basic.c @@ -568,7 +568,8 @@ one_file (const char *fname) oid = ksba_cert_get_digest_algo (cert); s = get_oid_desc (oid); - printf (" hash algo.: %s%s%s%s\n", oid, s?" (":"",s?s:"",s?")":""); + printf (" hash algo.: %s%s%s%s\n", + oid?oid:"(null)", s?" (":"",s?s:"",s?")":""); /* Under Windows the _ksba_keyinfo_from_sexp are not exported. */ #ifndef __WIN32
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor