summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShao Miller <shao.miller@yrdsb.edu.on.ca>2010-06-24 11:45:35 -0400
committerShao Miller <shao.miller@yrdsb.edu.on.ca>2010-06-24 11:45:35 -0400
commit3c1ef8860d20ea5e5374e9cc9e35befde9ca2635 (patch)
tree163361bf0fe2b649302f63766c04309833ba2cc2
parentb487ac97cc06d6e44e6dbfcb305114a2b315139a (diff)
downloadsyslinux-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.c2
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;