Browse Source

Made sure that iso_image_get_bootcat() cannot return non-zero size with NULL content

tags/release-1.5.2
Thomas Schmitt 1 year ago
parent
commit
fe98b35afb
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libisofs/eltorito.c

+ 2
- 1
libisofs/eltorito.c View File

@@ -711,13 +711,14 @@ int iso_image_get_bootcat(IsoImage *image, IsoBoot **catnode, uint32_t *lba,
return 0;
*catnode = bootcat;
*lba = bootcat->lba;
*size = bootcat->size;
if (bootcat->size > 0 && bootcat->content != NULL) {
*content = calloc(1, bootcat->size);
if (*content == NULL)
return ISO_OUT_OF_MEM;
memcpy(*content, bootcat->content, bootcat->size);
}
if (*content != NULL)
*size = bootcat->size;
return 1;
}



Loading…
Cancel
Save