Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
d85d95a4
Commit
d85d95a4
authored
Mar 01, 2017
by
Alexander Alashkin
Committed by
Cesanta Bot
Mar 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix potential out-of-bound
PUBLISHED_FROM=71b40189bcedbe9338915c1aad939835125dad26
parent
b5dd54a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
mongoose.c
mongoose.c
+1
-1
No files found.
mongoose.c
View file @
d85d95a4
...
...
@@ -1136,7 +1136,7 @@ struct mg_str mg_mk_str_n(const char *s, size_t len) {
int
mg_vcmp
(
const
struct
mg_str
*
str1
,
const
char
*
str2
)
WEAK
;
int
mg_vcmp
(
const
struct
mg_str
*
str1
,
const
char
*
str2
)
{
size_t
n2
=
strlen
(
str2
),
n1
=
str1
->
len
;
int
r
=
mem
cmp
(
str1
->
p
,
str2
,
(
n1
<
n2
)
?
n1
:
n2
);
int
r
=
strn
cmp
(
str1
->
p
,
str2
,
(
n1
<
n2
)
?
n1
:
n2
);
if
(
r
==
0
)
{
return
n1
-
n2
;
}
...
...
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