]> git.ozlabs.org Git - petitboot/commitdiff
discover/pxe-parser: All options are name <space> value pairs
authorJeremy Kerr <jk@ozlabs.org>
Thu, 4 Jul 2013 07:25:51 +0000 (15:25 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 4 Jul 2013 07:25:51 +0000 (15:25 +0800)
Abort the pair parse if we don't have both a name and a value.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/pxe-parser.c

index c300b697d0eeb769ab4986bc9e06397d4071cae6..67cb7882f46b77c85da01a8db7faa076773df7d3 100644 (file)
@@ -21,6 +21,9 @@ static void pxe_process_pair(struct conf_context *ctx,
        struct discover_boot_option *opt = ctx->parser_info;
        struct pb_url *url;
 
+       if (!name)
+               return;
+
        if (streq(name, "LABEL")) {
                if (opt)
                        pxe_finish(ctx);