File 0004-Fix-lookup-of-ECC-OIDs-by-name.patch of Package libksba.26430
From 9df0ac3a4afa0272dbff08d17e9064f13be95814 Mon Sep 17 00:00:00 2001
From: Werner Koch <wk@gnupg.org>
Date: Wed, 28 Oct 2015 11:18:59 +0100
Subject: [PATCH 1/9] Fix lookup of ECC OIDs by name.
* src/keyinfo.c (get_ecc_curve_oid): Fix obviously never tested table
lookup.
--
This led to a crash see
https://lists.gnupg.org/pipermail/gnupg-devel/2015-October/030445.html
The fix is obvious but I do not have test data for this.
Signed-off-by: Werner Koch <wk@gnupg.org>
---
src/keyinfo.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: libksba-1.3.0/src/keyinfo.c
===================================================================
--- libksba-1.3.0.orig/src/keyinfo.c
+++ libksba-1.3.0/src/keyinfo.c
@@ -322,10 +322,10 @@ get_ecc_curve_oid (const unsigned char *
if (buflen == strlen (curve_names[i].name)
&& !memcmp (buf, curve_names[i].name, buflen))
break;
- if (curve_names[i].oid)
+ if (!curve_names[i].oid)
return NULL; /* Not found. */
- buf = curve_names[i].name;
- buflen = strlen (curve_names[i].name);
+ buf = curve_names[i].oid;
+ buflen = strlen (curve_names[i].oid);
}
if (_ksba_oid_from_buf (buf, buflen, &der_oid, r_oidlen))