From: Kurt Zeilenga Date: Mon, 10 Jun 2002 19:56:17 +0000 (+0000) Subject: return PROTOCOL_ERROR if reqdata is empty. X-Git-Tag: NO_SLAP_OP_BLOCKS~1485 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4d3b4f9eb8a8c152038ae0ff85071f9150f0f3a5;p=openldap return PROTOCOL_ERROR if reqdata is empty. --- diff --git a/servers/slapd/passwd.c b/servers/slapd/passwd.c index 94cbeac0cf..4bc064a0ad 100644 --- a/servers/slapd/passwd.c +++ b/servers/slapd/passwd.c @@ -88,6 +88,11 @@ int slap_passwd_parse( struct berval *reqdata, return LDAP_SUCCESS; } + if( reqdata->bv_len == 0 ) { + *text = "empty request data field"; + return LDAP_PROTOCOL_ERROR; + } + /* ber_init2 uses reqdata directly, doesn't allocate new buffers */ ber_init2( ber, reqdata, 0 ); @@ -204,7 +209,6 @@ decoding_error: (long) len, 0, 0 ); #endif - *text = "data decoding error"; rc = LDAP_PROTOCOL_ERROR; }