Prevented SIGSEGVs when using -atip with my SCSI CD-ROM (sr,sg: no matter)

ZeroThreeEight
Thomas Schmitt 16 years ago
parent 8265834404
commit c6d22a1eb0
  1. 2
      cdrskin/cdrskin_timestamp.h
  2. 4
      libburn/mmc.c
  3. 10
      libburn/structure.c

@ -1 +1 @@
#define Cdrskin_timestamP "2006.12.11.115802"
#define Cdrskin_timestamP "2006.12.11.125222"

@ -423,7 +423,9 @@ void mmc_read_toc(struct burn_drive *d)
}
}
if (tdata[3] < 100) {
if (tdata[0] <= 0 || tdata[0] > d->disc->sessions)
tdata[0] = d->disc->sessions;
if (tdata[3] < 100 && tdata[0] > 0) {
track = burn_track_create();
burn_session_add_track(d->disc->session[tdata[0] - 1],
track, BURN_POS_END);

@ -386,13 +386,19 @@ int burn_disc_get_sectors(struct burn_disc *d)
void burn_track_get_entry(struct burn_track *t, struct burn_toc_entry *entry)
{
memcpy(entry, t->entry, sizeof(struct burn_toc_entry));
if (t->entry == NULL)
memset(entry, 0, sizeof(struct burn_toc_entry));
else
memcpy(entry, t->entry, sizeof(struct burn_toc_entry));
}
void burn_session_get_leadout_entry(struct burn_session *s,
struct burn_toc_entry *entry)
{
memcpy(entry, s->leadout_entry, sizeof(struct burn_toc_entry));
if (s->leadout_entry == NULL)
memset(entry, 0, sizeof(struct burn_toc_entry));
else
memcpy(entry, s->leadout_entry, sizeof(struct burn_toc_entry));
}
struct burn_session **burn_disc_get_sessions(struct burn_disc *d, int *num)

Loading…
Cancel
Save