Bug fix: SIGSEGV if the path given by iso_image_add_mips_boot_file()

does not exist in the image at image production time.
This commit is contained in:
Thomas Schmitt 2011-05-09 15:32:27 +02:00
parent 4eb2a7199c
commit 1a4b2a2584

View File

@ -305,9 +305,9 @@ static int boot_nodes_from_iso_path(Ecma119Image *t, char *path,
int ret; int ret;
ret = iso_tree_path_to_node(t->image, path, iso_node); ret = iso_tree_path_to_node(t->image, path, iso_node);
if (ret < 0) { if (ret <= 0) {
iso_msg_submit(t->image->id, ISO_BOOT_FILE_MISSING, 0, iso_msg_submit(t->image->id, ISO_BOOT_FILE_MISSING, 0,
"Cannot find %s '%s'", purpose, path); "Cannot find in ISO image: %s '%s'", purpose, path);
return ISO_BOOT_FILE_MISSING; return ISO_BOOT_FILE_MISSING;
} }
if ((*iso_node)->type != LIBISO_FILE) { if ((*iso_node)->type != LIBISO_FILE) {