Bug fix: El Torito production failed if no catalog name was given and the boot image path contains no slash
This commit is contained in:
parent
5a98a4cda5
commit
b0687643c5
@ -566,10 +566,8 @@ int iso_image_set_boot_image(IsoImage *image, const char *image_path,
|
||||
|
||||
/* get both the dir and the name */
|
||||
catname = strrchr(catdir, '/');
|
||||
if (catname == NULL) {
|
||||
free(catdir);
|
||||
return ISO_WRONG_ARG_VALUE;
|
||||
}
|
||||
if (catname == NULL)
|
||||
catname = catdir;
|
||||
if (catname == catdir) {
|
||||
/* we are appending catalog to root node */
|
||||
parent = image->root;
|
||||
@ -590,7 +588,8 @@ int iso_image_set_boot_image(IsoImage *image, const char *image_path,
|
||||
}
|
||||
parent = (IsoDir*)p;
|
||||
}
|
||||
catname++;
|
||||
if (catname[0] == '/')
|
||||
catname++;
|
||||
ret = iso_tree_add_boot_node(parent, catname, &cat_node);
|
||||
free(catdir);
|
||||
if (ret < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user