From 564dca34bf6a2424328e74c1c90edd3cfb3998d7 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sun, 8 Jan 2006 22:45:35 +0000 Subject: [PATCH] fix types; further check parameters --- libraries/libldap/pagectrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.39.5