aboutsummaryrefslogtreecommitdiffstats
path: root/scd/app-help.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2004-04-20 16:42:55 +0000
committerWerner Koch <[email protected]>2004-04-20 16:42:55 +0000
commit78f797d11d9201b3561b921b69b6de50df7160e8 (patch)
tree59d64e297d9d465fc9ab3f4b10907372afadbda5 /scd/app-help.c
parent2004-04-20 Marcus Brinkmann <[email protected]> (diff)
downloadgnupg-78f797d11d9201b3561b921b69b6de50df7160e8.tar.gz
gnupg-78f797d11d9201b3561b921b69b6de50df7160e8.zip
* command.c (scd_update_reader_status_file): Write status files.
* app-help.c (app_help_read_length_of_cert): Fixed calculation of R_CERTOFF. * pcsc-wrapper.c: New. * Makefile.am (pkglib_PROGRAMS): Install it here. * apdu.c (writen, readn): New. (open_pcsc_reader, pcsc_send_apdu, close_pcsc_reader): Use the pcsc-wrapper if we are using Pth. (apdu_send_le): Reinitialize RESULTLEN. Handle SW_EOF_REACHED like SW_SUCCESS.
Diffstat (limited to 'scd/app-help.c')
-rw-r--r--scd/app-help.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/scd/app-help.c b/scd/app-help.c
index c6695635f..1c3c52b15 100644
--- a/scd/app-help.c
+++ b/scd/app-help.c
@@ -147,8 +147,13 @@ app_help_read_length_of_cert (int slot, int fid, size_t *r_certoff)
is the certificate. */
*r_certoff += hdrlen + objlen;
if (*r_certoff > resultlen)
- return 0; /* That should never happen. */
+ {
+ *r_certoff = 0;
+ return 0; /* That should never happen. */
+ }
}
+ else
+ *r_certoff = 0;
}
return resultlen;