Fix #404: possible undefined behavior --without-fstab

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2024-04-28 14:22:57 +02:00
parent 0cae7d44dd
commit 4a2381eb6f
+4 -1
View File
@@ -348,8 +348,11 @@ static void parse_kernel_loglevel(void)
*/
void conf_parse_cmdline(int argc, char *argv[])
{
const char *ptr;
/* Set up defaults */
fstab = strdup(FINIT_FSTAB);
if ((ptr = FINIT_FSTAB))
fstab = strdup(ptr);
finit_conf = strdup(FINIT_CONF);
finit_rcsd = strdup(FINIT_RCSD);
path = getenv("PATH");