Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Ng
OpenLDAP
Commits
1702d408
Commit
1702d408
authored
22 years ago
by
Howard Chu
Browse files
Options
Downloads
Patches
Plain Diff
ITS#2184 maxbuf tweaks from Larry Greenfield @ CMU
parent
ca4764cc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/libldap/cyrus.c
+4
-5
4 additions, 5 deletions
libraries/libldap/cyrus.c
with
4 additions
and
5 deletions
libraries/libldap/cyrus.c
+
4
−
5
View file @
1702d408
...
...
@@ -194,10 +194,6 @@ sb_sasl_pkt_length( const unsigned char *buf, unsigned max, int 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 !!! */
...
...
@@ -344,11 +340,14 @@ sb_sasl_write( Sockbuf_IO_Desc *sbiod, void *buf, ber_len_t len)
/* now encode the next packet. */
#if SASL_VERSION_MAJOR >= 2
ber_pvt_sb_buf_init
(
&
p
->
buf_out
);
/* sasl v2 makes sure this number is correct */
if
(
len
>
*
p
->
sasl_maxbuf
)
len
=
*
p
->
sasl_maxbuf
;
#else
ber_pvt_sb_buf_destroy
(
&
p
->
buf_out
);
#endif
if
(
len
>
*
p
->
sasl_maxbuf
-
100
)
len
=
*
p
->
sasl_maxbuf
-
100
;
/* For safety margin */
#endif
ret
=
sasl_encode
(
p
->
sasl_context
,
buf
,
len
,
(
SASL_CONST
char
**
)
&
p
->
buf_out
.
buf_base
,
(
unsigned
*
)
&
p
->
buf_out
.
buf_size
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment