fixes two bugs

This commit is contained in:
NIIBE Yutaka
2012-01-19 14:23:01 +09:00
parent 87e4fd50c1
commit f92ee76db5
3 changed files with 51 additions and 23 deletions

View File

@@ -1253,7 +1253,10 @@ gpg_do_get_data (uint16_t tag, int with_tag)
apdu.res_apdu_data = &ch_certificate_start;
apdu.res_apdu_data_len = ((apdu.res_apdu_data[2] << 8) | apdu.res_apdu_data[3]);
if (apdu.res_apdu_data_len == 0xffff)
GPG_NO_RECORD ();
{
apdu.res_apdu_data_len = 0;
GPG_NO_RECORD ();
}
else
/* Add length of (tag+len) */
apdu.res_apdu_data_len += 4;