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,
Attachment:
pgpdwr59ZUF2k.pgp
Description: PGP signature