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
fd80d9d6
Commit
fd80d9d6
authored
Apr 28, 2015
by
Dag Haavi Finstad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PROXY1: Avoid AN() on malformed input.
parent
22004936
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
cache_proxy_proto.c
bin/varnishd/proxy/cache_proxy_proto.c
+2
-1
o00000.vtc
bin/varnishtest/tests/o00000.vtc
+6
-0
No files found.
bin/varnishd/proxy/cache_proxy_proto.c
View file @
fd80d9d6
...
...
@@ -66,7 +66,8 @@ vpx_proto1(const struct worker *wrk, struct req *req)
VSL
(
SLT_Debug
,
req
->
sp
->
fd
,
"PROXY1"
);
q
=
strchr
(
req
->
htc
->
rxbuf_b
,
'\r'
);
AN
(
q
);
if
(
!
q
)
return
(
-
1
);
*
q
++
=
'\0'
;
/* Nuke the CRNL */
...
...
bin/varnishtest/tests/o00000.vtc
View file @
fd80d9d6
...
...
@@ -157,3 +157,9 @@ client c1 {
} -run
delay .1
# Malformed (missing \r)
client c1 {
send "PROXY TCP4 1.2.3.4 5.6.7.8 1234 5678\n"
expect_close
} -run
delay .1
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