Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
04a2843a
Commit
04a2843a
authored
Aug 25, 2006
by
Kurt Zeilenga
Browse files
Added ldapsearch bad filter pattern check (ITS#4647)
parent
b8fc3a5f
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGES
View file @
04a2843a
OpenLDAP 2.3 Change Log
OpenLDAP 2.3.28 Engineering
Added ldapsearch bad filter pattern check (ITS#4647)
OpenLDAP 2.3.27 Release
Fixed libldap dangling pointer issue (previous fix was broken) (ITS#4405)
...
...
clients/tools/ldapsearch.c
View file @
04a2843a
...
...
@@ -611,12 +611,32 @@ main( int argc, char **argv )
}
if
(
infile
!=
NULL
)
{
int
percent
=
0
;
if
(
infile
[
0
]
==
'-'
&&
infile
[
1
]
==
'\0'
)
{
fp
=
stdin
;
}
else
if
((
fp
=
fopen
(
infile
,
"r"
))
==
NULL
)
{
perror
(
infile
);
return
EXIT_FAILURE
;
}
for
(
i
=
0
;
filtpattern
[
i
]
;
i
++
)
{
if
(
filtpattern
[
i
]
==
'%'
)
{
if
(
percent
)
{
fprintf
(
stderr
,
_
(
"Bad filter pattern
\"
%s
\"\n
"
),
filtpattern
);
return
EXIT_FAILURE
;
}
percent
++
;
if
(
filtpattern
[
i
+
1
]
!=
's'
)
{
fprintf
(
stderr
,
_
(
"Bad filter pattern
\"
%s
\"\n
"
),
filtpattern
);
return
EXIT_FAILURE
;
}
}
}
}
if
(
tmpdir
==
NULL
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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