Fix nullptr in with_command_1
Commit Message
Reproduced with gdb built from git HEAD, running 'with' without
arguments. Patch is attached.
Regards,
Bogdan
Comments
>>>>> "Bogdan" == Bogdan Harjoc <harjoc@gmail.com> writes:
Bogdan> Reproduced with gdb built from git HEAD, running 'with' without
Bogdan> arguments. Patch is attached.
This needs a ChangeLog entry.
I think a simple test case would also be good.
thanks,
Tom
@@ -217,6 +217,9 @@ void
with_command_1 (const char *set_cmd_prefix,
cmd_list_element *setlist, const char *args, int from_tty)
{
+ if (args == nullptr)
+ error (_("Missing arguments."));
+
const char *delim = strstr (args, "--");
const char *nested_cmd = nullptr;