mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-01 16:33:02 +01:00
g10: Fix segfault on unsupported curve.
* g10/call-agent.c (learn_status_cb): Don't use NULL for strcmp. -- With libgcrypt not supporting cv25519, gpg segfaults. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
d33a34004b
commit
b8bb16c6c0
@ -701,14 +701,10 @@ learn_status_cb (void *opaque, const char *line)
|
||||
{
|
||||
const char *curve;
|
||||
|
||||
i = 0;
|
||||
do
|
||||
{
|
||||
curve = openpgp_enum_curves (&i);
|
||||
if (!strcmp (curve, line+n))
|
||||
break;
|
||||
}
|
||||
while (curve != NULL);
|
||||
for (i = 0; (curve = openpgp_enum_curves (&i));)
|
||||
if (!strcmp (curve, line+n))
|
||||
break;
|
||||
|
||||
parm->key_attr[keyno].curve = curve;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user