From 3675d407ecf4908a231eb6bde6bb6408f20a9e81 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 15 Mar 2013 14:38:16 +0100 Subject: relay: add a missing buffer availability check Signed-off-by: Felix Fietkau --- relay.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'relay.c') diff --git a/relay.c b/relay.c index ba6b95a..83664e6 100644 --- a/relay.c +++ b/relay.c @@ -76,6 +76,9 @@ static void relay_process_headers(struct relay *r) char *val; buf = ustream_get_read_buf(s, &len); + if (!buf || !len) + break; + newline = strchr(buf, '\n'); if (!newline) break; -- cgit v1.2.3