Prevented SIGSEGVs when using -atip with my SCSI CD-ROM (sr,sg: no matter)
This commit is contained in:
parent
76cf98c90f
commit
b9f04783a5
@ -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…
Reference in New Issue
Block a user