diff --git a/ChangeLog b/ChangeLog index 0dd07e8..c1b5fcc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2018-02-12 NIIBE Yutaka + + * src/openpgp-do.c (rw_kdf): Return 0 when NULL. + 2018-01-23 NIIBE Yutaka * VERSION: 1.2.8. diff --git a/src/openpgp-do.c b/src/openpgp-do.c index a9fb771..8fceb9d 100644 --- a/src/openpgp-do.c +++ b/src/openpgp-do.c @@ -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; } }