From: Pierangelo Masarati Date: Sun, 8 Jan 2006 22:45:35 +0000 (+0000) Subject: fix types; further check parameters X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~396 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=564dca34bf6a2424328e74c1c90edd3cfb3998d7;p=openldap fix types; further check parameters --- diff --git a/libraries/libldap/pagectrl.c b/libraries/libldap/pagectrl.c index 67f648c37b..d470eef167 100644 --- a/libraries/libldap/pagectrl.c +++ b/libraries/libldap/pagectrl.c @@ -85,7 +85,7 @@ ldap_create_page_control_value( ber_tag_t tag; struct berval null_cookie = { 0, NULL }; - if ( ld == NULL || value == NULL ) { + if ( ld == NULL || value == NULL || pagesize > LDAP_MAXINT ) { ld->ld_errno = LDAP_PARAM_ERROR; return ld->ld_errno; } @@ -105,7 +105,7 @@ ldap_create_page_control_value( return ld->ld_errno; } - tag = ber_printf( ber, "{iO}", pagesize, cookie ); + tag = ber_printf( ber, "{iO}", (ber_int_t)pagesize, cookie ); if ( tag == LBER_ERROR ) { goto error_return; }