Add a check in 'ptr.o' to prevent a crash in the
'if (ptr.o->type != UCI_TYPE_STRING)' statement
when ptr.o is null. This issue occurs due to the
absence of 'password' or 'username' in the login
section of /etc/config/rpcd.
Signed-off-by: IssamHamdi <ih@simonwunderlich.de>
if (uci_lookup_ptr(uci, &ptr, NULL, true))
continue;
+ if (!ptr.o)
+ continue;
+
if (ptr.o->type != UCI_TYPE_STRING)
continue;
if (uci_lookup_ptr(uci, &ptr, NULL, true))
continue;
+ if (!ptr.o)
+ continue;
+
if (ptr.o->type != UCI_TYPE_STRING)
continue;