projects
/
profile
/
ivi
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8cca6fd
)
diskio: add a paranoia cast
author
H. Peter Anvin
<hpa@zytor.com>
Sat, 17 Jul 2010 19:40:01 +0000
(12:40 -0700)
committer
H. Peter Anvin
<hpa@zytor.com>
Sat, 17 Jul 2010 19:40:01 +0000
(12:40 -0700)
Make sure we don't overflow the shift, even though that should never
be possible.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
core/fs/diskio.c
patch
|
blob
|
history
diff --git
a/core/fs/diskio.c
b/core/fs/diskio.c
index
449e12c
..
481b59b
100644
(file)
--- a/
core/fs/diskio.c
+++ b/
core/fs/diskio.c
@@
-12,7
+12,7
@@
static inline sector_t chs_max(const struct disk *disk)
{
- return disk->secpercyl << 10;
+ return
(sector_t)
disk->secpercyl << 10;
}
static int chs_rdwr_sectors(struct disk *disk, void *buf,