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
c9bab31a
Commit
c9bab31a
authored
20 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
use size_t better for buffer and alloc lengths
parent
2f60e91a
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/transfer.c
+6
-6
6 additions, 6 deletions
lib/transfer.c
lib/urldata.h
+2
-2
2 additions, 2 deletions
lib/urldata.h
with
8 additions
and
8 deletions
lib/transfer.c
+
6
−
6
View file @
c9bab31a
...
...
@@ -296,7 +296,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
do
{
int
hbufp_index
;
int
rest_length
;
in
t
full_length
;
size_
t
full_length
;
int
writetype
;
/* str_start is start of line within buf */
...
...
@@ -356,8 +356,8 @@ CURLcode Curl_readwrite(struct connectdata *conn,
if
(
k
->
hbuflen
+
full_length
>=
data
->
state
.
headersize
)
{
char
*
newbuff
;
long
newsize
=
CURLMAX
((
k
->
hbuflen
+
full_length
)
*
3
/
2
,
data
->
state
.
headersize
*
2
);
size_t
newsize
=
CURLMAX
((
k
->
hbuflen
+
full_length
)
*
3
/
2
,
data
->
state
.
headersize
*
2
);
hbufp_index
=
k
->
hbufp
-
data
->
state
.
headerbuff
;
newbuff
=
(
char
*
)
realloc
(
data
->
state
.
headerbuff
,
newsize
);
if
(
!
newbuff
)
{
...
...
@@ -667,7 +667,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
else
if
(
checkprefix
(
"Content-Type:"
,
k
->
p
))
{
char
*
start
;
char
*
end
;
in
t
len
;
size_
t
len
;
/* Find the first non-space letter */
for
(
start
=
k
->
p
+
13
;
...
...
@@ -1643,7 +1643,7 @@ CURLcode Curl_follow(struct SessionHandle *data,
/* Location: redirect */
char
prot
[
16
];
/* URL protocol string storage */
char
letter
;
/* used for a silly sscanf */
in
t
newlen
;
size_
t
newlen
;
char
*
newest
;
if
(
data
->
set
.
maxredirs
&&
...
...
@@ -1683,7 +1683,7 @@ CURLcode Curl_follow(struct SessionHandle *data,
char
*
pathsep
;
char
*
useurl
=
newurl
;
in
t
urllen
;
size_
t
urllen
;
/* we must make our own copy of the URL to play with, as it may
point to read-only data */
...
...
This diff is collapsed.
Click to expand it.
lib/urldata.h
+
2
−
2
View file @
c9bab31a
...
...
@@ -337,7 +337,7 @@ struct Curl_transfer_keeper {
int
headerline
;
/* counts header lines to better track the
first one */
char
*
hbufp
;
/* points at *end* of header line */
in
t
hbuflen
;
size_
t
hbuflen
;
char
*
str
;
/* within buf */
char
*
str_start
;
/* within buf */
char
*
end_ptr
;
/* within buf */
...
...
@@ -704,7 +704,7 @@ struct UrlState {
long
numconnects
;
/* size of the 'connects' array */
char
*
headerbuff
;
/* allocated buffer to store headers in */
in
t
headersize
;
/* size of the allocation */
size_
t
headersize
;
/* size of the allocation */
char
buffer
[
BUFSIZE
+
1
];
/* download buffer */
char
uploadbuffer
[
BUFSIZE
+
1
];
/* upload buffer */
...
...
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