scd: Fix handling for Data Object with no data.
authorNIIBE Yutaka <gniibe@fsij.org>
Mon, 12 Feb 2018 09:56:58 +0000 (18:56 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Mon, 12 Feb 2018 09:56:58 +0000 (18:56 +0900)
commit0a3bec2c2525935362f87dce93d7df2c8d498498
treed04194bfb0a302cd83c91a61be34c5d9b349f19d
parente0658b19d93b38ed9ebd07734c4678acdde1607d
scd: Fix handling for Data Object with no data.

* scd/app-openpgp.c (get_cached_data): Return NULL for Data Object
with no data.

--

When GET_DATA returns no data with success (90 00), this routine
firstly returned buffer with length zero, and secondly (with cache)
returned NULL, which is inconsistent.  Now, it returns NULL for both
cases.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
scd/app-openpgp.c