Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simon
OpenLDAP
Commits
21796e67
Commit
21796e67
authored
Nov 19, 2003
by
Kurt Zeilenga
Browse files
Don't assume offsetof(foo,firstelement) is zero
parent
1989cf6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
servers/slapd/controls.c
View file @
21796e67
...
...
@@ -986,7 +986,7 @@ static int parsePreRead (
}
siz
=
sizeof
(
AttributeName
);
off
=
0
;
off
=
offsetof
(
AttributeName
,
an_name
)
;
if
(
ber_scanf
(
ber
,
"{M}"
,
&
an
,
&
siz
,
off
)
==
LBER_ERROR
)
{
rs
->
sr_text
=
"preread control: decoding error"
;
return
LDAP_PROTOCOL_ERROR
;
...
...
@@ -1035,7 +1035,7 @@ static int parsePostRead (
}
siz
=
sizeof
(
AttributeName
);
off
=
0
;
off
=
offsetof
(
AttributeName
,
an_name
)
;
if
(
ber_scanf
(
ber
,
"{M}"
,
&
an
,
&
siz
,
off
)
==
LBER_ERROR
)
{
rs
->
sr_text
=
"postread control: decoding error"
;
return
LDAP_PROTOCOL_ERROR
;
...
...
servers/slapd/search.c
View file @
21796e67
...
...
@@ -159,7 +159,7 @@ do_search(
/* attributes */
siz
=
sizeof
(
AttributeName
);
off
=
0
;
off
=
offsetof
(
AttributeName
,
an_name
)
;
if
(
ber_scanf
(
op
->
o_ber
,
"{M}}"
,
&
op
->
ors_attrs
,
&
siz
,
off
)
==
LBER_ERROR
)
{
send_ldap_discon
(
op
,
rs
,
LDAP_PROTOCOL_ERROR
,
"decoding attrs error"
);
rs
->
sr_err
=
SLAPD_DISCONNECT
;
...
...
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