bug in the Solaris/Schilling driver part of sanei/sanei_scsic

(null pointer dereference) fixed.
bug in backend/tatamrack.c (inconsistent arguments of sanei_scsi_cmd) fixed.
DEVEL_2_0_BRANCH-1
Abel Deuring 2001-02-26 23:01:43 +00:00
rodzic 0d78da6256
commit 0c18bf49c4
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -562,7 +562,7 @@ read_data (Tamarack_Scanner *s, SANE_Byte *buf, int lines, int bpl)
gettimeofday (&tv_start,NULL);
#endif
status = sanei_scsi_cmd (s->fd, &cmd, sizeof (cmd)+2, buf, &nbytes);
status = sanei_scsi_cmd (s->fd, &cmd, sizeof (cmd), buf, &nbytes);
#ifdef DEBUG
gettimeofday (&tv_end,NULL);

Wyświetl plik

@ -3857,8 +3857,8 @@ scsi_cmd (int fd,
handler = fd_info[fd].sense_handler;
DBG (3, "cmd=%x, error=%d:%s, bsiz=%d, stat=%x,%x,%x, slen=%d\n",
scmd.cdb.g0_cdb.cmd, scmd.error, strerror (scmd.errno),
*dst_size, scmd.u_scb.cmd_scb[0], scmd.u_scb.cmd_scb[1],
scmd.u_scb.cmd_scb[2], scmd.sense_count);
((dst_size != NULL)?(*dst_size):0), scmd.u_scb.cmd_scb[0],
scmd.u_scb.cmd_scb[1], scmd.u_scb.cmd_scb[2], scmd.sense_count);
*errbf = '\0';
for (i = 0; i < scmd.sense_count; i++)
sprintf (errbf + strlen (errbf), "%x,", scmd.u_sense.cmd_sense[i]);