Browse Source

Bug fix: El Torito production failed if no catalog name was given and the boot image path contains no slash

release-1.5.4.branch
Thomas Schmitt 6 months ago
parent
commit
b0687643c5
  1. 9
      libisofs/eltorito.c

9
libisofs/eltorito.c

@ -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…
Cancel
Save