Commit a6c10e9a authored by Max Kellermann's avatar Max Kellermann

protocol/ArgParser: check for invalid ranges

Catch errors like that early, before invalid ranges get passed to internal MPD subsystems.
parent 19a46064
ver 0.22.5 (not yet released)
* protocol
- error for malformed ranges instead of ignoring silently
* database
- simple: fix missing CUE sheet metadata in "addid" command
* tags
......
......@@ -110,6 +110,10 @@ ParseCommandArgRange(const char *s)
return RangeArg::Single(range.start);
}
if (!range.IsWellFormed())
throw FormatProtocolError(ACK_ERROR_ARG,
"Malformed range: %s", s);
return range;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment