]> git.sur5r.net Git - openldap/commitdiff
More ITS#6215: Fix va_arg integer types for ber_scanf "bei" & ber_printf "BX"
authorHallvard Furuseth <hallvard@openldap.org>
Wed, 29 Jul 2009 23:03:10 +0000 (23:03 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Wed, 29 Jul 2009 23:03:10 +0000 (23:03 +0000)
libraries/liblber/decode.c
libraries/liblber/encode.c

index a256c521e625caa4144d47fd5d280690e0f30512..f68c61f9bd9cd16bfeb7de7d83ccaa4a0d7ae5dd 100644 (file)
@@ -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 */
index 0514f2f6180cece71adb15a363394b7d2a33f7bc..a2098326d4013e7d9d6511d20ead03bc6a571de3 100644 (file)
@@ -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;