diff --git a/ChangeLog b/ChangeLog index 20e41b6ef..e62028e8d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-06-25 Grégoire Sutre + + Fix overflow. + + * grub-core/kern/emu/hostdisk.c (grub_util_get_fd_size) + [__NetBSD__]: Add explicit cast before bitshift. + 2012-06-23 Vladimir Serbinenko * configure.ac: Bump to 2.00~rc1. diff --git a/grub-core/kern/emu/hostdisk.c b/grub-core/kern/emu/hostdisk.c index 43db9d6ec..b8c376643 100644 --- a/grub-core/kern/emu/hostdisk.c +++ b/grub-core/kern/emu/hostdisk.c @@ -309,7 +309,7 @@ grub_util_get_fd_size (int fd, const char *name, unsigned *log_secsize) # if defined (__APPLE__) return nr << log_sector_size; # elif defined(__NetBSD__) - return label.d_secperunit << log_sector_size; + return (grub_uint64_t) label.d_secperunit << log_sector_size; # elif defined (__sun__) return minfo.dki_capacity << log_sector_size; # else