Skip to content

Commit efa878f

Browse files
committed
Merge branch 'fix/sticker-find-arguments' of github.com:acts-1631/MPD into v0.24.x
2 parents 1972176 + 3a01cfc commit efa878f

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

NEWS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ver 0.24.15 (not yet released)
22
* protocol
3-
- fix crash on "sticker delete"
3+
- fix crash on "sticker delete" and "sticker find"
44
* database
55
- upnp: fix crash bug
66
* input

src/command/StickerCommands.cxx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,12 @@ handle_sticker(Client &client, Request args, Response &r)
524524
args.pop_back();
525525
}
526526

527-
bool has_op = args.size() > 4;
527+
if (args.size() != 4 && args.size() != 6) {
528+
r.Error(ACK_ERROR_ARG, "bad request");
529+
return CommandResult::ERROR;
530+
}
531+
532+
const bool has_op = args.size() == 6;
528533
auto value = has_op ? args[5] : nullptr;
529534
StickerOperator op = StickerOperator::EXISTS;
530535
if (has_op) {

0 commit comments

Comments
 (0)