--- cdrtools-2.01/mkisofs/write.c.jj 2005-08-27 10:16:33.000000000 +0200 +++ cdrtools-2.01/mkisofs/write.c 2005-08-27 10:29:41.000000000 +0200 @@ -1907,7 +1907,7 @@ pvd_write(outfile) /* Next we write out the primary descriptor for the disc */ memset(&vol_desc, 0, sizeof (vol_desc)); vol_desc.type[0] = ISO_VD_PRIMARY; - memcpy(vol_desc.id, ISO_STANDARD_ID, sizeof (ISO_STANDARD_ID)); + memcpy(vol_desc.id, ISO_STANDARD_ID, sizeof (ISO_STANDARD_ID) - 1); vol_desc.version[0] = 1; memset(vol_desc.system_id, ' ', sizeof (vol_desc.system_id)); @@ -2030,7 +2030,7 @@ evd_write(outfile) */ memset(&evol_desc, 0, sizeof (evol_desc)); evol_desc.type[0] = (unsigned char) ISO_VD_END; - memcpy(evol_desc.id, ISO_STANDARD_ID, sizeof (ISO_STANDARD_ID)); + memcpy(evol_desc.id, ISO_STANDARD_ID, sizeof (ISO_STANDARD_ID) - 1); evol_desc.version[0] = 1; xfwrite(&evol_desc, SECTOR_SIZE, 1, outfile, 0, TRUE); last_extent_written += 1; --- cdrtools-2.01/mkisofs/eltorito.c.jj 2004-05-23 22:46:05.000000000 +0200 +++ cdrtools-2.01/mkisofs/eltorito.c 2005-08-27 10:30:50.000000000 +0200 @@ -270,7 +270,7 @@ get_torito_desc(boot_desc) memset(boot_desc, 0, sizeof (*boot_desc)); boot_desc->type[0] = 0; - memcpy(boot_desc->id, ISO_STANDARD_ID, sizeof (ISO_STANDARD_ID)); + memcpy(boot_desc->id, ISO_STANDARD_ID, sizeof (ISO_STANDARD_ID) - 1); boot_desc->version[0] = 1; memcpy(boot_desc->system_id, EL_TORITO_ID, sizeof (EL_TORITO_ID)); --- cdrtools-2.01/cdda2wav/toc.c.jj 2004-05-21 22:56:44.000000000 +0200 +++ cdrtools-2.01/cdda2wav/toc.c 2005-08-27 10:25:04.000000000 +0200 @@ -959,7 +959,12 @@ process_cddb_titles(sock_fd, inbuff, rea if (*target != NULL) **target = '\0'; } else { - realloc(*target, strlen(*target) + clen - 1); + char *newp = realloc(*target, strlen(*target) + clen - 1); + if (newp == NULL) { + free (*target); + *target = NULL; + } else + *target = newp; } if (*target != NULL) { strcat((char *)*target, inbuff+ind+7); @@ -994,7 +999,12 @@ process_cddb_titles(sock_fd, inbuff, rea if (global.tracktitle[tno] != NULL) *(global.tracktitle[tno]) = '\0'; } else { - realloc(global.tracktitle[tno], strlen((char *)global.tracktitle[tno]) + p - q + 1 ); + char *newp = realloc(global.tracktitle[tno], strlen((char *)global.tracktitle[tno]) + p - q + 1 ); + if (newp == NULL) { + free (global.tracktitle[tno]); + global.tracktitle[tno] = NULL; + } else + global.tracktitle[tno] = newp; } if (global.tracktitle[tno] != NULL) { strcat((char *)global.tracktitle[tno], q+1);