Commit a00a786
committed
scsi: sr: Sanity check returned mode data
Kefeng Wang discovered that old versions of the QEMU CD driver would
return mangled mode data causing us to walk off the end of the buffer in
an attempt to parse it. Sanity check the returned mode sense data.
Cc: <[email protected]>
Reported-by: Kefeng Wang <[email protected]>
Tested-by: Kefeng Wang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>1 parent 6780414 commit a00a786
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
836 | 836 | | |
837 | 837 | | |
838 | 838 | | |
| 839 | + | |
839 | 840 | | |
840 | 841 | | |
841 | 842 | | |
| |||
862 | 863 | | |
863 | 864 | | |
864 | 865 | | |
865 | | - | |
| 866 | + | |
866 | 867 | | |
867 | 868 | | |
868 | | - | |
| 869 | + | |
| 870 | + | |
869 | 871 | | |
870 | 872 | | |
871 | 873 | | |
| |||
0 commit comments