[syslinux:master] chain: Fix allocation size in read_sectors
syslinux-bot for Shao Miller
shao.miller at yrdsb.edu.on.ca
Fri Jun 25 14:12:23 PDT 2010
Commit-ID: 3c1ef8860d20ea5e5374e9cc9e35befde9ca2635
Gitweb: http://syslinux.zytor.com/commit/3c1ef8860d20ea5e5374e9cc9e35befde9ca2635
Author: Shao Miller <shao.miller at yrdsb.edu.on.ca>
AuthorDate: Thu, 24 Jun 2010 11:45:35 -0400
Committer: Shao Miller <shao.miller at yrdsb.edu.on.ca>
CommitDate: Thu, 24 Jun 2010 11:45:35 -0400
chain: Fix allocation size in read_sectors
Oops. We might allocate more than just one sector.
Signed-off-by: Shao Miller <shao.miller at yrdsb.edu.on.ca>
---
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 d5bf4f0..6b0c56a 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;
More information about the Syslinux-commits
mailing list