From 78f797d11d9201b3561b921b69b6de50df7160e8 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 20 Apr 2004 16:42:55 +0000 Subject: * 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. --- scd/app-help.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scd/app-help.c') 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; -- cgit v1.2.3