aboutsummaryrefslogtreecommitdiffstats
path: root/g10/misc.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2020-08-19 06:18:42 +0000
committerNIIBE Yutaka <[email protected]>2020-08-19 06:18:42 +0000
commit1d66b518ca83e8d315283682b1e504f1e171a0b1 (patch)
tree67bbcc4065ff4392f7816c5649c7b1a2b3090f92 /g10/misc.c
parentdns: Fix memory use-after-free. (diff)
downloadgnupg-1d66b518ca83e8d315283682b1e504f1e171a0b1.tar.gz
gnupg-1d66b518ca83e8d315283682b1e504f1e171a0b1.zip
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 <[email protected]>
Diffstat (limited to 'g10/misc.c')
-rw-r--r--g10/misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/misc.c b/g10/misc.c
index 32a5e22b3..6d3b047e8 100644
--- a/g10/misc.c
+++ b/g10/misc.c
@@ -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;