diff options
author | Shao Miller <shao.miller@yrdsb.edu.on.ca> | 2010-06-24 11:45:35 -0400 |
---|---|---|
committer | Shao Miller <shao.miller@yrdsb.edu.on.ca> | 2010-06-24 11:45:35 -0400 |
commit | 3c1ef8860d20ea5e5374e9cc9e35befde9ca2635 (patch) | |
tree | 163361bf0fe2b649302f63766c04309833ba2cc2 | |
parent | b487ac97cc06d6e44e6dbfcb305114a2b315139a (diff) | |
download | syslinux-3c1ef8860d20ea5e5374e9cc9e35befde9ca2635.tar.gz |
chain: Fix allocation size in read_sectors
Oops. We might allocate more than just one sector.
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
-rw-r--r-- | com32/modules/chain.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/modules/chain.c b/com32/modules/chain.c index d5bf4f0d..6b0c56a4 100644 --- a/com32/modules/chain.c +++ b/com32/modules/chain.c @@ -266,7 +266,7 @@ static void *read_sectors(uint64_t lba, uint8_t count) if (int13_retry(&inreg, NULL)) return NULL; - data = malloc(SECTOR); + data = malloc(count * SECTOR); if (data) memcpy(data, buf, count * SECTOR); return data; |