1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

(main) <gpgconf_list>: Fixed output for pcsc_driver.

This commit is contained in:
Werner Koch 2004-03-23 12:33:20 +00:00
parent 3b2e2e7418
commit 0c36e10633
3 changed files with 11 additions and 15 deletions

View file

@ -157,12 +157,6 @@ parse_ber_header (unsigned char const **buffer, size_t *size,
tag = 0;
do
{
/* Simple check against overflow. We limit our maximim tag
value more than needed but that should not be a problem
because I have nver encountered such large value. We
assume at least 32 bit integers. */
if (tag > (1 << 24))
return gpg_error (GPG_ERR_TOO_LARGE);
tag <<= 7;
if (!length)
return gpg_error (GPG_ERR_EOF);
@ -190,16 +184,11 @@ parse_ber_header (unsigned char const **buffer, size_t *size,
unsigned long len = 0;
int count = c & 0x7f;
if (count > sizeof (len) || count > sizeof (size_t))
return gpg_error (GPG_ERR_BAD_BER);
for (; count; count--)
{
/* Simple check against overflow. We limit our maximim
length more than needed but that should not be a problem
because I have never encountered such large value and
well they are managed in memory and thus we would run
into memory problems anyway. We assume at least 32 bit
integers. */
if (len > (1 << 24))
return gpg_error (GPG_ERR_TOO_LARGE);
len <<= 8;
if (!length)
return gpg_error (GPG_ERR_EOF);