Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
fe1ec6da
Commit
fe1ec6da
authored
Oct 02, 2015
by
Poul-Henning Kamp
Committed by
Lasse Karstensen
Jan 13, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fail the VSB if vsnprintf(3) fails.
parent
fd51c52f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
vsb.c
lib/libvarnish/vsb.c
+4
-0
No files found.
lib/libvarnish/vsb.c
View file @
fe1ec6da
...
@@ -350,6 +350,10 @@ VSB_vprintf(struct vsb *s, const char *fmt, va_list ap)
...
@@ -350,6 +350,10 @@ VSB_vprintf(struct vsb *s, const char *fmt, va_list ap)
va_copy
(
ap_copy
,
ap
);
va_copy
(
ap_copy
,
ap
);
len
=
vsnprintf
(
&
s
->
s_buf
[
s
->
s_len
],
VSB_FREESPACE
(
s
)
+
1
,
len
=
vsnprintf
(
&
s
->
s_buf
[
s
->
s_len
],
VSB_FREESPACE
(
s
)
+
1
,
fmt
,
ap_copy
);
fmt
,
ap_copy
);
if
(
len
<
0
)
{
s
->
s_error
=
errno
;
return
(
-
1
);
}
va_end
(
ap_copy
);
va_end
(
ap_copy
);
}
while
(
len
>
VSB_FREESPACE
(
s
)
&&
}
while
(
len
>
VSB_FREESPACE
(
s
)
&&
VSB_extend
(
s
,
len
-
VSB_FREESPACE
(
s
))
==
0
);
VSB_extend
(
s
,
len
-
VSB_FREESPACE
(
s
))
==
0
);
...
...
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