mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
return PROTOCOL_ERROR if reqdata is empty.
This commit is contained in:
parent
09a2a8fbce
commit
4d3b4f9eb8
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user