commit | d369ddab802b33c43b19367e61e99bea7b147c6b | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Wed Jul 13 13:42:17 2016 +0200 |
committer | Michal Vasko <mvasko@cesnet.cz> | Wed Jul 13 13:43:45 2016 +0200 |
tree | 02818f612383e7dbd1ad2cae0491ee8c4b09f6b9 | |
parent | ce24bf37049ce31b4ff4bda5ca54dce7fa38a756 [diff] |
BUGFIX handle missing \n on a chunk start Fixes #5
diff --git a/src/io.c b/src/io.c index 662f9e3..9c9a7c8 100644 --- a/src/io.c +++ b/src/io.c
@@ -297,6 +297,10 @@ if (!strcmp(chunk, "#\n")) { /* end of chunked framing message */ free(chunk); + if (!msg) { + ERR("Session %u: invalid frame chunk delimiters.", session->id); + goto malformed_msg; + } break; }