diff options
author | Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> | 2015-11-11 16:58:59 +1100 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> | 2015-12-18 11:15:58 +1100 |
commit | 8cfcec4279b229dacfb0589bc443f8a4cbd83082 (patch) | |
tree | fea7b4c75df27db1ad72a73f9b5aeeae19e49e63 /discover/platform-powerpc.c | |
parent | 218b5233de442ce67784f9f5e3cd43b2b3f3306b (diff) | |
download | petitboot-8cfcec4279b229dacfb0589bc443f8a4cbd83082.zip petitboot-8cfcec4279b229dacfb0589bc443f8a4cbd83082.tar.gz |
discover: Skip malformed bootdev fields
Fixes Coverity defect #30471
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Diffstat (limited to 'discover/platform-powerpc.c')
-rw-r--r-- | discover/platform-powerpc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/discover/platform-powerpc.c b/discover/platform-powerpc.c index 2480b8d..7370d7d 100644 --- a/discover/platform-powerpc.c +++ b/discover/platform-powerpc.c @@ -438,7 +438,6 @@ static void populate_bootdev_config(struct platform_powerpc *platform, { struct autoboot_option *opt, *new = NULL; char *pos, *end, *old_dev = NULL; - const char delim = ' '; unsigned int n_new = 0; const char *val; bool conflict; @@ -469,11 +468,9 @@ static void populate_bootdev_config(struct platform_powerpc *platform, if (read_bootdev(config, &pos, opt)) { pb_log("bootdev config is in an unknown format " - "(expected uuid:... or mac:...)"); + "(expected uuid:... or mac:...)\n"); talloc_free(opt); - if (strchr(pos, delim)) - continue; - return; + continue; } new = talloc_realloc(config, new, struct autoboot_option, |