/*
* A simple gateway for set-uid scripts
*
- * (c) 2013 Martin Mares <mj@ucw.cz>
+ * (c) 2013-2022 Martin Mares <mj@ucw.cz>
*/
#undef DEBUG
static void get_script_name(const char *arg0)
{
+ if (!arg0)
+ die("Program name must be given");
+
// If arg0 is a path, extract the last component
const char *p = strrchr(arg0, '/');
if (p)