From: Will Sowerbutts Date: Sun, 25 Jan 2015 20:16:49 +0000 (+0000) Subject: Kernel: syscall_exec: Convert block number to off_t before shifting, X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=889f7ea02d4500b99271b2a2f7ba26aff8b88f39;p=FUZIX.git Kernel: syscall_exec: Convert block number to off_t before shifting, otherwise we're restricted to accessing only the first 64KB of the disk. --- diff --git a/Kernel/syscall_exec.c b/Kernel/syscall_exec.c index 586f8d69..e2d758f0 100644 --- a/Kernel/syscall_exec.c +++ b/Kernel/syscall_exec.c @@ -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) {