mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-13 22:21:09 +02:00
scd: Fix size_t/int mismatch in libusb
* scd/ccid-driver.c (bulk_in, abort_cmd, ccid_poll): Change msglen to int. -- Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
1b90b52a56
commit
3d952a2fe5
@ -1952,7 +1952,7 @@ bulk_in (ccid_driver_t handle, unsigned char *buffer, size_t length,
|
|||||||
int no_debug)
|
int no_debug)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
size_t msglen;
|
int msglen;
|
||||||
int eagain_retries = 0;
|
int eagain_retries = 0;
|
||||||
|
|
||||||
/* Fixme: The next line for the current Valgrind without support
|
/* Fixme: The next line for the current Valgrind without support
|
||||||
@ -1973,6 +1973,8 @@ bulk_in (ccid_driver_t handle, unsigned char *buffer, size_t length,
|
|||||||
}
|
}
|
||||||
return CCID_DRIVER_ERR_CARD_IO_ERROR;
|
return CCID_DRIVER_ERR_CARD_IO_ERROR;
|
||||||
}
|
}
|
||||||
|
if (msglen < 0)
|
||||||
|
return CCID_DRIVER_ERR_INV_VALUE; /* Faulty libusb. */
|
||||||
*nread = msglen;
|
*nread = msglen;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2081,7 +2083,7 @@ abort_cmd (ccid_driver_t handle, int seqno)
|
|||||||
int rc;
|
int rc;
|
||||||
char dummybuf[8];
|
char dummybuf[8];
|
||||||
unsigned char msg[100];
|
unsigned char msg[100];
|
||||||
size_t msglen;
|
int msglen;
|
||||||
|
|
||||||
if (!handle->idev)
|
if (!handle->idev)
|
||||||
{
|
{
|
||||||
@ -2252,7 +2254,7 @@ ccid_poll (ccid_driver_t handle)
|
|||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
unsigned char msg[10];
|
unsigned char msg[10];
|
||||||
size_t msglen;
|
int msglen;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
if (handle->idev)
|
if (handle->idev)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user