mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-12 23:01:14 +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;
|
const char *curve;
|
||||||
|
|
||||||
i = 0;
|
for (i = 0; (curve = openpgp_enum_curves (&i));)
|
||||||
do
|
if (!strcmp (curve, line+n))
|
||||||
{
|
break;
|
||||||
curve = openpgp_enum_curves (&i);
|
|
||||||
if (!strcmp (curve, line+n))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
while (curve != NULL);
|
|
||||||
parm->key_attr[keyno].curve = curve;
|
parm->key_attr[keyno].curve = curve;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user