]> git.sur5r.net Git - openldap/commitdiff
ITS#8027 require non-empty AttributeList
authorHoward Chu <hyc@openldap.org>
Mon, 19 Jan 2015 22:25:53 +0000 (22:25 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 22 Jan 2015 01:56:23 +0000 (19:56 -0600)
servers/slapd/overlays/deref.c

index 9420e3e37990ae92e1cd7ceb70f34ba59c865f6b..05aa890eea365942b8093a7c7e21be13ef147ecb 100644 (file)
@@ -183,7 +183,8 @@ deref_parseCtrl (
                ber_len_t cnt = sizeof(struct berval);
                ber_len_t off = 0;
 
-               if ( ber_scanf( ber, "{m{M}}", &derefAttr, &attributes, &cnt, off ) == LBER_ERROR )
+               if ( ber_scanf( ber, "{m{M}}", &derefAttr, &attributes, &cnt, off ) == LBER_ERROR
+                       || !cnt )
                {
                        rs->sr_text = "Dereference control: derefSpec decoding error";
                        rs->sr_err = LDAP_PROTOCOL_ERROR;