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
b535cb31
Commit
b535cb31
authored
Jun 22, 2016
by
Deomid Ryabkov
Committed by
Cesanta Bot
Jun 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure asprintf'd string is NUL-terminated
PUBLISHED_FROM=b4062780d22be37acdbecd86e5951245e2908ff8
parent
e3a9c6af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
mongoose.c
mongoose.c
+2
-2
No files found.
mongoose.c
View file @
b535cb31
...
...
@@ -10238,13 +10238,13 @@ int asprintf(char **strp, const char *fmt, ...) {
va_end
(
ap
);
if
(
len
>
0
)
{
*
strp
=
realloc
(
*
strp
,
len
);
*
strp
=
realloc
(
*
strp
,
len
+
1
);
if
(
*
strp
==
NULL
)
return
-
1
;
}
if
(
len
>=
BUFSIZ
)
{
va_start
(
ap
,
fmt
);
len
=
vsnprintf
(
*
strp
,
len
,
fmt
,
ap
);
len
=
vsnprintf
(
*
strp
,
len
+
1
,
fmt
,
ap
);
va_end
(
ap
);
}
...
...
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