Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nadezhda Ivanova
OpenLDAP
Commits
221db1f1
Commit
221db1f1
authored
Aug 09, 1998
by
Kurt Zeilenga
Browse files
LDAPworld P9: SLAPD crashes with filter containing zero elements
parent
daeb0284
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/filter.c
View file @
221db1f1
...
...
@@ -135,6 +135,7 @@ get_filter( Connection *conn, BerElement *ber, Filter **filt, char **fstr )
Debug
(
LDAP_DEBUG_FILTER
,
"AND
\n
"
,
0
,
0
,
0
);
if
(
(
err
=
get_filter_list
(
conn
,
ber
,
&
f
->
f_and
,
&
ftmp
))
==
0
)
{
if
(
ftmp
==
NULL
)
ftmp
=
strdup
(
""
);
*
fstr
=
ch_malloc
(
4
+
strlen
(
ftmp
)
);
sprintf
(
*
fstr
,
"(&%s)"
,
ftmp
);
free
(
ftmp
);
...
...
@@ -145,6 +146,7 @@ get_filter( Connection *conn, BerElement *ber, Filter **filt, char **fstr )
Debug
(
LDAP_DEBUG_FILTER
,
"OR
\n
"
,
0
,
0
,
0
);
if
(
(
err
=
get_filter_list
(
conn
,
ber
,
&
f
->
f_or
,
&
ftmp
))
==
0
)
{
if
(
ftmp
==
NULL
)
ftmp
=
strdup
(
""
);
*
fstr
=
ch_malloc
(
4
+
strlen
(
ftmp
)
);
sprintf
(
*
fstr
,
"(|%s)"
,
ftmp
);
free
(
ftmp
);
...
...
@@ -155,6 +157,7 @@ get_filter( Connection *conn, BerElement *ber, Filter **filt, char **fstr )
Debug
(
LDAP_DEBUG_FILTER
,
"NOT
\n
"
,
0
,
0
,
0
);
(
void
)
ber_skip_tag
(
ber
,
&
len
);
if
(
(
err
=
get_filter
(
conn
,
ber
,
&
f
->
f_not
,
&
ftmp
))
==
0
)
{
if
(
ftmp
==
NULL
)
ftmp
=
strdup
(
""
);
*
fstr
=
ch_malloc
(
4
+
strlen
(
ftmp
)
);
sprintf
(
*
fstr
,
"(!%s)"
,
ftmp
);
free
(
ftmp
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment