mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-04 13:21:45 +00:00
[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>
This commit is contained in:
parent
bd576c9523
commit
a460ad6226
2 changed files with 2 additions and 2 deletions
|
@ -114,7 +114,7 @@ struct pkt_ctrl_command {
|
|||
|
||||
struct packet_settings
|
||||
{
|
||||
__u8 size; /* packet size in (512 byte) sectors */
|
||||
__u32 size; /* packet size in (512 byte) sectors */
|
||||
__u8 fp; /* fixed packets */
|
||||
__u8 link_loss; /* the rest is specified
|
||||
* as per Mt Fuji */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue