From: Hallvard Furuseth Date: Wed, 29 Jul 2009 23:03:10 +0000 (+0000) Subject: More ITS#6215: Fix va_arg integer types for ber_scanf "bei" & ber_printf "BX" X-Git-Tag: ACLCHECK_0~381 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=19b8065922a92b623ad19a2a3d9169994bfd90da;p=openldap More ITS#6215: Fix va_arg integer types for ber_scanf "bei" & ber_printf "BX" --- diff --git a/libraries/liblber/decode.c b/libraries/liblber/decode.c index a256c521e6..f68c61f9bd 100644 --- a/libraries/liblber/decode.c +++ b/libraries/liblber/decode.c @@ -745,7 +745,7 @@ ber_scanf ( BerElement *ber, break; case 'e': /* enumerated */ - case 'i': /* int */ + case 'i': /* integer */ i = va_arg( ap, ber_int_t * ); rc = ber_get_int( ber, i ); break; @@ -899,8 +899,8 @@ ber_scanf ( BerElement *ber, case 'b': /* boolean */ case 'e': /* enumerated */ - case 'i': /* int */ - (void) va_arg( ap, int * ); + case 'i': /* integer */ + (void) va_arg( ap, ber_int_t * ); break; case 'l': /* length of next item */ diff --git a/libraries/liblber/encode.c b/libraries/liblber/encode.c index 0514f2f618..a2098326d4 100644 --- a/libraries/liblber/encode.c +++ b/libraries/liblber/encode.c @@ -578,7 +578,7 @@ ber_printf( BerElement *ber, LDAP_CONST char *fmt, ... ) case 'B': /* bit string */ case 'X': /* bit string (deprecated) */ s = va_arg( ap, char * ); - len = va_arg( ap, int ); /* in bits */ + len = va_arg( ap, ber_len_t ); /* in bits */ rc = ber_put_bitstring( ber, s, len, ber->ber_tag ); break;