aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/DatabaseCommands.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-04-25 11:28:17 +0200
committerMax Kellermann <max@duempel.org>2014-04-25 11:28:17 +0200
commit95b1a640b68066901abeb92e44b9cdd40631ff7a (patch)
tree247177982d44a78bf635f929a00435fe8e0671c1 /src/command/DatabaseCommands.cxx
parentecc12c9ba15809c918be5577cc90eba108569cbd (diff)
downloadmpd-95b1a640b68066901abeb92e44b9cdd40631ff7a.tar.gz
mpd-95b1a640b68066901abeb92e44b9cdd40631ff7a.tar.xz
mpd-95b1a640b68066901abeb92e44b9cdd40631ff7a.zip
DatabaseCommands: disallow "grouping" by the selected tag
Fixes assertion failure.
Diffstat (limited to 'src/command/DatabaseCommands.cxx')
-rw-r--r--src/command/DatabaseCommands.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/command/DatabaseCommands.cxx b/src/command/DatabaseCommands.cxx
index d586067c1..e1f129d0a 100644
--- a/src/command/DatabaseCommands.cxx
+++ b/src/command/DatabaseCommands.cxx
@@ -234,6 +234,13 @@ handle_list(Client &client, int argc, char *argv[])
}
}
+ if (tagType < TAG_NUM_OF_ITEM_TYPES &&
+ group_mask & (1u << tagType)) {
+ delete filter;
+ command_error(client, ACK_ERROR_ARG, "Conflicting group");
+ return CommandResult::ERROR;
+ }
+
Error error;
CommandResult ret =
listAllUniqueTags(client, tagType, group_mask, filter, error)