Subject: Null pointer dereference of cmd_name in shell.c
From: lazuse
Date: Wed, 27 May 2020 15:02:02 +0000
Hello,

In "tools/shell.c", line 63, pointer "cmd_name" will be dereferenced as NULL unless it is set in Line 59 when argv[0] is prefixed with "mega". Now, megatools crashes if ran as something like "a.out".

Please consider wrapping Line 62-65 with "if (cmd_name != NULL)".