]> git.hungrycats.org Git - linux/commitdiff
[PATCH] cdrom buffer too small
authorJens Axboe <axboe@suse.de>
Thu, 20 Mar 2003 14:01:46 +0000 (06:01 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Thu, 20 Mar 2003 14:01:46 +0000 (06:01 -0800)
dvd_read_physical() uses a 20 char buffer to read in the dvd structure,
however the size is really 4 bytes header + 17 bytes body so layer->bca
ends up containing garbage. Kudos to the nice folks who made it a non
multiple of 4 bytes.

drivers/cdrom/cdrom.c

index aea2bdce51b533f9b23b999e543a593ae116fb2b..c2774d5224cce6f04020472383ef2bcd8e24262b 100644 (file)
@@ -1125,7 +1125,7 @@ static int dvd_do_auth(struct cdrom_device_info *cdi, dvd_authinfo *ai)
 
 static int dvd_read_physical(struct cdrom_device_info *cdi, dvd_struct *s)
 {
-       unsigned char buf[20], *base;
+       unsigned char buf[21], *base;
        struct dvd_layer *layer;
        struct cdrom_generic_command cgc;
        struct cdrom_device_ops *cdo = cdi->ops;