From: Felix Fietkau Date: Thu, 23 May 2013 10:35:44 +0000 (+0200) Subject: fix infinite loop when the initial two characters in a connection are \r\n X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuhttpd.git;a=commitdiff_plain;h=692cb27c49f9c543aef8f25f8c270a27ddec2a74 fix infinite loop when the initial two characters in a connection are \r\n Signed-off-by: Felix Fietkau --- diff --git a/client.c b/client.c index 6d23283..a971b3b 100644 --- a/client.c +++ b/client.c @@ -194,8 +194,10 @@ static bool client_init_cb(struct client *cl, char *buf, int len) if (!newline) return false; - if (newline == buf) + if (newline == buf) { + ustream_consume(cl->us, 2); return true; + } *newline = 0; blob_buf_init(&cl->hdr, 0);