From: Kyle Hale Date: Thu, 5 Jul 2012 19:32:37 +0000 (-0500) Subject: Check to make sure extension name is provided X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=38d4628c6eb960164ae8d7c6fffe3820b9d6acb9 Check to make sure extension name is provided Fixes a null pointer dereference that occurs if an extension is provided without a name --- diff --git a/palacios/src/palacios/vmm_config.c b/palacios/src/palacios/vmm_config.c index ea772ce..9125d2e 100644 --- a/palacios/src/palacios/vmm_config.c +++ b/palacios/src/palacios/vmm_config.c @@ -607,6 +607,11 @@ static int setup_extensions(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) { while (extension) { char * ext_name = v3_cfg_val(extension, "name"); + if (!ext_name) { + PrintError("Extension has no name\n"); + return -1; + } + V3_Print("Configuring extension %s\n", ext_name); if (v3_add_extension(vm, ext_name, extension) == -1) {