protocol/ArgParser: check for invalid ranges
Catch errors like that early, before invalid ranges get passed to internal MPD subsystems.
This commit is contained in:
parent
19a46064e9
commit
a6c10e9a1c
2
NEWS
2
NEWS
@ -1,4 +1,6 @@
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user