aboutsummaryrefslogtreecommitdiff
path: root/proxy-proto.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2024-06-17 20:47:24 +0000
committerOmar Polo <op@omarpolo.com>2024-06-17 20:47:24 +0000
commit2a090b866d78d8e9a06a1e49e6b48cd4b5a488d0 (patch)
tree3c9d8812fdba5810c8e78a9c97294b49951fdd29 /proxy-proto.c
parentfb8311e48f5ee4a4d11299ee7aadabca581eb1da (diff)
proxy-proto: ensure there's a space after "TCP4/6"
Diffstat (limited to 'proxy-proto.c')
-rw-r--r--proxy-proto.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/proxy-proto.c b/proxy-proto.c
index bef2633..fe5436d 100644
--- a/proxy-proto.c
+++ b/proxy-proto.c
@@ -51,6 +51,9 @@ check_proto_v1(char **buf)
default: return (-1);
}
+ if ((*buf)[1] != ' ')
+ return (-1);
+
// '4' / '6' + ' '
*buf += 2;