diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-05-23 12:35:44 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-05-23 12:35:44 +0200 |
commit | 692cb27c49f9c543aef8f25f8c270a27ddec2a74 (patch) | |
tree | 97a897fa6940c776d05e5ed8792c5bbe06aad70d /client.c | |
parent | 7a6811b705d6cca54b1367459fa19bb6d1234c45 (diff) |
fix infinite loop when the initial two characters in a connection are \r\n
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); |