Bug fix: Potential buffer overflow introduced with revision 2024

This commit is contained in:
Thomas Schmitt 2008-09-28 19:39:00 +00:00
parent 32252122b8
commit c2c2499862
2 changed files with 3 additions and 4 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2008.09.16.060250"
#define Cdrskin_timestamP "2008.09.28.193802"

View File

@ -1045,7 +1045,7 @@ enum response scsi_error_msg(struct burn_drive *d, unsigned char *sense,
break;
return FAIL;
case 0x30:
if (*key != 2)
if (*key != 2 && *key != 5)
break;
if (*ascq == 1)
sprintf(msg, "Cannot read medium, unknown format");
@ -1151,8 +1151,7 @@ int scsi_notify_error(struct burn_drive *d, struct command *c,
if (d->silent_on_scsi_error)
return 1;
scsi_error_msg(d, sense, senselen, scsi_msg + strlen(scsi_msg),
&key, &asc, &ascq);
scsi_error_msg(d, sense, senselen, scsi_msg, &key, &asc, &ascq);
if (!(flag & 1)) {
/* SPC : TEST UNIT READY command */