Kernel: syscall_exec: Convert block number to off_t before shifting,
authorWill Sowerbutts <will@sowerbutts.com>
Sun, 25 Jan 2015 20:16:49 +0000 (20:16 +0000)
committerWill Sowerbutts <will@sowerbutts.com>
Sun, 25 Jan 2015 21:51:17 +0000 (21:51 +0000)
otherwise we're restricted to accessing only the first 64KB of the disk.

Kernel/syscall_exec.c

index 586f8d6..e2d758f 100644 (file)
@@ -25,7 +25,7 @@ static int bload(inoptr i, uint16_t bl, uint16_t base, uint16_t len)
 #else
                        /* Might be worth spotting sequential blocks and
                           merging ? */
-                       udata.u_offset = blk << 9;
+                       udata.u_offset = (off_t)blk << 9;
                        udata.u_count = 512;
                        udata.u_base = (uint8_t *)base;
                        if (cdread(i->c_dev, 0) < 0) {