Commit d1751295 authored by Alessandro Rubini's avatar Alessandro Rubini

userspace/wrs_version: fix segault wiht incorrect sdb

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent e730efe5
......@@ -135,6 +135,8 @@ static char *sdb_get(char *fname, char *tagname)
}
/* Look for the tag */
s = strstr(buf, tagname);
if (!s)
return unknown;
sscanf(s, "%*[^:]:%*c%[^\n]", result);
return result;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment