projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
30cc854
)
Fix proxy reply parsing broken by the previous commit.
author
Guus Sliepen
<guus@tinc-vpn.org>
Fri, 14 Oct 2016 12:27:19 +0000
(14:27 +0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Fri, 14 Oct 2016 12:27:19 +0000
(14:27 +0200)
src/proxy.c
patch
|
blob
|
history
diff --git
a/src/proxy.c
b/src/proxy.c
index 2b8f87c13e36dcc5d32e47968ae8f33b2c14ae3c..22d494718d959971e153f805b119e86ae1a71e6a 100644
(file)
--- a/
src/proxy.c
+++ b/
src/proxy.c
@@
-257,8
+257,8
@@
int receive_proxy_meta(connection_t *c, int start, int lenin) {
if(!p || p - c->buffer >= c->buflen)
return 0;
- while(
p = memchr(p + 1, '\n', c->buflen - (p + 1 - c->buffer
))) {
- if(p
[-1] == '\n'
)
+ while(
(p = memchr(p + 1, '\n', c->buflen - (p + 1 - c->buffer)
))) {
+ if(p
> c->buffer + 3 && !memcmp(p - 3, "\r\n\r\n", 4)
)
break;
}