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
cae9ec7a
Commit
cae9ec7a
authored
Jul 10, 2002
by
Kurt Zeilenga
Browse files
Fix bufsiz issues
parent
16360cc0
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/libldap/cyrus.c
View file @
cae9ec7a
...
...
@@ -161,12 +161,16 @@ sb_sasl_pkt_length( const unsigned char *buf, unsigned max, int debuglevel )
|
buf
[
2
]
<<
8
|
buf
[
3
];
if
(
size
>
max
)
{
if
(
size
>
SASL_MAX_BUFF_SIZE
)
{
/* somebody is trying to mess me up. */
ber_log_printf
(
LDAP_DEBUG_ANY
,
debuglevel
,
"sb_sasl_pkt_length: received illegal packet length "
"of %lu bytes
\n
"
,
(
unsigned
long
)
size
);
size
=
16
;
/* this should lead to an error. */
}
else
if
(
size
>
max
)
{
ber_log_printf
(
LDAP_DEBUG_ANY
,
debuglevel
,
"sb_sasl_pkt_length: received packet length "
"of %lu exceeds negotiated max of %lu bytes
\n
"
,
(
unsigned
long
)
size
,
(
unsigned
long
)
max
);
}
return
size
+
4
;
/* include the size !!! */
...
...
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