[PATCH] Disallow empty tag name as target for rename.
Thorsten Wißmann
edu at thorsten-wissmann.de
Tue May 20 22:25:01 CEST 2014
On Tue, May 20, 2014 at 06:44:05PM +0200, Florian Bruhin wrote:
> Using hc rename default '' or similiar it was possible to create an
> empty tag which should be prevented, the attached patch fixes this.
Looked at the mail. Can merge&push without any testing :)
f86edbf Disallow empty tag name as target for rename.
Cheers,
Thorsten
> @@ -272,6 +272,11 @@ int tag_rename_command(int argc, char** argv, GString* output) {
> if (argc < 3) {
> return HERBST_NEED_MORE_ARGS;
> }
> + if (!strcmp("", argv[2])) {
> + g_string_append_printf(output,
> + "%s: An empty tag name is not permitted\n", argv[0]);
> + return HERBST_INVALID_ARGUMENT;
> + }
> HSTag* tag = find_tag(argv[1]);
> if (!tag) {
> g_string_append_printf(output,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 230 bytes
Desc: not available
URL: <https://listi.jpberlin.de/pipermail/hlwm/attachments/20140520/3af368a2/attachment.sig>
More information about the hlwm
mailing list