Detect bad line endings and print error.

This commit is contained in:
Michael Drake 2014-06-01 20:37:26 +01:00
parent 5085bfbf99
commit 56556a677e

View File

@ -781,6 +781,11 @@ static bool parse_chunk(struct parse_context *ctx, const char *buf, size_t len,
}
while (pos < end) {
if (*pos == '\r') {
LOG(LOG_ERROR, "Detected \'\\r\': Bad line ending\n");
return false;
}
switch (ctx->state) {
case START:
if (*pos != '*') {