]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9937 libldap: fix put_simple_filter() with invalid filter
authorHoward Chu <hyc@openldap.org>
Thu, 20 Oct 2022 11:38:02 +0000 (12:38 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 25 Oct 2022 19:13:03 +0000 (19:13 +0000)
Add check for trivial input string.

libraries/libldap/filter.c

index 064b2ea381f54120a944ef08da003b04ac4655eb..e158fd1fe3a07347364e9b96ffd57c6171829afb 100644 (file)
@@ -555,6 +555,8 @@ put_simple_filter(
        Debug1( LDAP_DEBUG_TRACE, "put_simple_filter: \"%s\"\n",
                str );
 
+       if ( str[0] == '=' ) return -1;
+
        str = LDAP_STRDUP( str );
        if( str == NULL ) return -1;