Fix KDF DO handling.

This commit is contained in:
NIIBE Yutaka
2018-02-13 07:26:29 +09:00
parent 40b1d453dc
commit c73bb0548e
2 changed files with 9 additions and 1 deletions

View File

@@ -1,3 +1,7 @@
2018-02-12 NIIBE Yutaka <gniibe@fsij.org>
* src/openpgp-do.c (rw_kdf): Return 0 when NULL.
2018-01-23 NIIBE Yutaka <gniibe@fsij.org>
* VERSION: 1.2.8.

View File

@@ -860,7 +860,11 @@ rw_kdf (uint16_t tag, int with_tag, const uint8_t *data, int len, int is_write)
}
else
{
copy_do_1 (tag, do_ptr[NR_DO_KDF], with_tag);
if (do_ptr[NR_DO_KDF])
copy_do_1 (tag, do_ptr[NR_DO_KDF], with_tag);
else
return 0;
return 1;
}
}