X-Git-Url: https://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fparser-conf.c;h=4bd23871bc6e6980c2dc3d785de0eeb3bad27a74;hp=94612c326a6cdd35332443b1f5846878eafdd4fd;hb=07bf13167aacf49a694aea3341caa15379916bec;hpb=7c8683fa009115f8a3b08b7a7666b64ebcbbc1bc diff --git a/discover/parser-conf.c b/discover/parser-conf.c index 94612c3..4bd2387 100644 --- a/discover/parser-conf.c +++ b/discover/parser-conf.c @@ -46,6 +46,9 @@ char *conf_strip_str(char *s) if (!s) return NULL; + if (!strlen(s)) + return NULL; + while (*s == '"' || *s == '\'' || isspace(*s)) s++;