Made sure that only existent CDB bytes get accessed by SCSI command logging. Coverity CID 21806.
This commit is contained in:
parent
c91748cddf
commit
f98dc02b08
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2015.10.19.174459"
|
#define Cdrskin_timestamP "2015.10.23.103324"
|
||||||
|
@ -1753,12 +1753,12 @@ int scsi_show_command(unsigned char *opcode, int oplen, int dir,
|
|||||||
if (flag & 1)
|
if (flag & 1)
|
||||||
return 1;
|
return 1;
|
||||||
if (opcode[0] == 0x2A) { /* WRITE 10 */
|
if (opcode[0] == 0x2A) { /* WRITE 10 */
|
||||||
if (flag & 2)
|
if ((flag & 2) && oplen > 8)
|
||||||
fprintf(fp, "%d -> %d\n",
|
fprintf(fp, "%d -> %d\n",
|
||||||
(opcode[7] << 8) | opcode[8],
|
(opcode[7] << 8) | opcode[8],
|
||||||
mmc_four_char_to_int(opcode + 2));
|
mmc_four_char_to_int(opcode + 2));
|
||||||
} else if (opcode[0] == 0xAA) { /* WRITE 12 */
|
} else if (opcode[0] == 0xAA) { /* WRITE 12 */
|
||||||
if (flag & 2)
|
if ((flag & 2) && oplen > 9)
|
||||||
fprintf(fp, "%d -> %d\n",
|
fprintf(fp, "%d -> %d\n",
|
||||||
mmc_four_char_to_int(opcode + 6),
|
mmc_four_char_to_int(opcode + 6),
|
||||||
mmc_four_char_to_int(opcode + 2));
|
mmc_four_char_to_int(opcode + 2));
|
||||||
|
Loading…
Reference in New Issue
Block a user