gpg: Fix condition of string_to_aead_algo.

* g10/misc.c (string_to_aead_algo): Only compare if not NULL.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2020-08-19 15:18:42 +09:00
parent cc0d53905c
commit 1d66b518ca
1 changed files with 1 additions and 1 deletions

View File

@ -1216,7 +1216,7 @@ string_to_aead_algo (const char *string)
if (!string)
result = 0;
if (!ascii_strcasecmp (string, "EAX"))
else if (!ascii_strcasecmp (string, "EAX"))
result = 1;
else if (!ascii_strcasecmp (string, "OCB"))
result = 2;