Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
7afe788c
Commit
7afe788c
authored
May 21, 2019
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
smart transport: use size_t for sizes
parent
db7f1d9b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/transports/smart.c
+3
-3
No files found.
src/transports/smart.c
View file @
7afe788c
...
@@ -73,7 +73,7 @@ static int git_smart__set_callbacks(
...
@@ -73,7 +73,7 @@ static int git_smart__set_callbacks(
return
0
;
return
0
;
}
}
static
in
t
http_header_name_length
(
const
char
*
http_header
)
static
size_
t
http_header_name_length
(
const
char
*
http_header
)
{
{
const
char
*
colon
=
strchr
(
http_header
,
':'
);
const
char
*
colon
=
strchr
(
http_header
,
':'
);
if
(
!
colon
)
if
(
!
colon
)
...
@@ -84,7 +84,7 @@ static int http_header_name_length(const char *http_header)
...
@@ -84,7 +84,7 @@ static int http_header_name_length(const char *http_header)
static
bool
is_malformed_http_header
(
const
char
*
http_header
)
static
bool
is_malformed_http_header
(
const
char
*
http_header
)
{
{
const
char
*
c
;
const
char
*
c
;
in
t
name_len
;
size_
t
name_len
;
/* Disallow \r and \n */
/* Disallow \r and \n */
c
=
strchr
(
http_header
,
'\r'
);
c
=
strchr
(
http_header
,
'\r'
);
...
@@ -114,7 +114,7 @@ static char *forbidden_custom_headers[] = {
...
@@ -114,7 +114,7 @@ static char *forbidden_custom_headers[] = {
static
bool
is_forbidden_custom_header
(
const
char
*
custom_header
)
static
bool
is_forbidden_custom_header
(
const
char
*
custom_header
)
{
{
unsigned
long
i
;
unsigned
long
i
;
in
t
name_len
=
http_header_name_length
(
custom_header
);
size_
t
name_len
=
http_header_name_length
(
custom_header
);
/* Disallow headers that we set */
/* Disallow headers that we set */
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
forbidden_custom_headers
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
forbidden_custom_headers
);
i
++
)
...
...
Write
Preview
Markdown
is supported
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