diff options
author | Phillip Susi <psusi@cfl.rr.com> | 2006-02-05 02:27:44 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-05 14:06:52 -0500 |
commit | a460ad62260def15c42130de253d6cfc32528a2f (patch) | |
tree | 6fd5b90db456ae6a333a224b8c1c975474bb3c27 /include/linux/pktcdvd.h | |
parent | bd576c9523fbf23e94fb7dbe05d2ae1cf96864e4 (diff) |
[PATCH] pktcdvd: Fix overflow for discs with large packets
The pktcdvd driver was using an 8 bit field to store the packet length
obtained from the disc track info. This causes it to overflow packet length
values of 128KB or more. I changed the field to 32 bits to fix this.
The pktcdvd driver defaulted to its maximum allowed packet length when it
detected a 0 in the track info field. I changed this to fail the operation
and refuse to access the media. This seems more sane than attempting to
access it with a value that almost certainly will not work.
Signed-off-by: Peter Osterlund <petero2@telia.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/pktcdvd.h')
-rw-r--r-- | include/linux/pktcdvd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/pktcdvd.h b/include/linux/pktcdvd.h index 2c177e4c8f22..d1c9c4a86e52 100644 --- a/include/linux/pktcdvd.h +++ b/include/linux/pktcdvd.h | |||
@@ -114,7 +114,7 @@ struct pkt_ctrl_command { | |||
114 | 114 | ||
115 | struct packet_settings | 115 | struct packet_settings |
116 | { | 116 | { |
117 | __u8 size; /* packet size in (512 byte) sectors */ | 117 | __u32 size; /* packet size in (512 byte) sectors */ |
118 | __u8 fp; /* fixed packets */ | 118 | __u8 fp; /* fixed packets */ |
119 | __u8 link_loss; /* the rest is specified | 119 | __u8 link_loss; /* the rest is specified |
120 | * as per Mt Fuji */ | 120 | * as per Mt Fuji */ |