Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
d1837ad9
Commit
d1837ad9
authored
15 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
use (s)size_t for string lengths to fix compiler warns
parent
fd10ed56
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/pop3.c
+3
-3
3 additions, 3 deletions
lib/pop3.c
lib/smtp.c
+1
-1
1 addition, 1 deletion
lib/smtp.c
with
4 additions
and
4 deletions
lib/pop3.c
+
3
−
3
View file @
d1837ad9
...
...
@@ -990,9 +990,9 @@ CURLcode Curl_pop3_write(struct connectdata *conn,
0d 0a 2e 0d 0a. This marker can of course be spread out
over up to 5 different data chunks. Deal with it! */
struct
pop3_conn
*
pop3c
=
&
conn
->
proto
.
pop3c
;
in
t
checkmax
=
(
nread
>=
POP3_EOB_LEN
?
POP3_EOB_LEN
:
nread
);
in
t
checkleft
=
POP3_EOB_LEN
-
pop3c
->
eob
;
in
t
check
=
(
checkmax
>=
checkleft
?
checkleft
:
checkmax
);
size_
t
checkmax
=
(
nread
>=
POP3_EOB_LEN
?
POP3_EOB_LEN
:
nread
);
size_
t
checkleft
=
POP3_EOB_LEN
-
pop3c
->
eob
;
size_
t
check
=
(
checkmax
>=
checkleft
?
checkleft
:
checkmax
);
if
(
!
memcmp
(
POP3_EOB
,
&
str
[
nread
-
check
],
check
))
{
/* substring match */
...
...
This diff is collapsed.
Click to expand it.
lib/smtp.c
+
1
−
1
View file @
d1837ad9
...
...
@@ -1059,7 +1059,7 @@ CURLcode Curl_smtp_escape_eob(struct connectdata *conn, ssize_t nread)
/* This loop can be improved by some kind of Boyer-Moore style of
approach but that is saved for later... */
for
(
i
=
0
,
si
=
0
;
i
<
nread
;
i
++
,
si
++
)
{
in
t
left
=
nread
-
i
;
ssize_
t
left
=
nread
-
i
;
if
(
left
>=
(
SMTP_EOB_LEN
-
smtpc
->
eob
))
{
if
(
!
memcmp
(
SMTP_EOB
+
smtpc
->
eob
,
&
data
->
req
.
upload_fromhere
[
i
],
...
...
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