projects
/
platform
/
upstream
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b487ac9
)
chain: Fix allocation size in read_sectors
author
Shao Miller
<shao.miller@yrdsb.edu.on.ca>
Thu, 24 Jun 2010 15:45:35 +0000
(11:45 -0400)
committer
Shao Miller
<shao.miller@yrdsb.edu.on.ca>
Thu, 24 Jun 2010 15:45:35 +0000
(11:45 -0400)
Oops. We might allocate more than just one sector.
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
com32/modules/chain.c
patch
|
blob
|
history
diff --git
a/com32/modules/chain.c
b/com32/modules/chain.c
index
d5bf4f0
..
6b0c56a
100644
(file)
--- 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;