From: Felix Fietkau Date: Fri, 15 Mar 2013 13:38:16 +0000 (+0100) Subject: relay: add a missing buffer availability check X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3675d407ecf4908a231eb6bde6bb6408f20a9e81;p=project%2Fuhttpd.git relay: add a missing buffer availability check Signed-off-by: Felix Fietkau --- 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;