* grub-core/kern/dl.c: Don't discard const attribute.
This commit is contained in:
parent
2f9c48041a
commit
05126706b0
2 changed files with 7 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
2013-12-21 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/kern/dl.c: Don't discard const attribute.
|
||||
|
||||
2013-12-21 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/kern/disk.c: Fix potential overflow.
|
||||
|
|
|
@ -223,7 +223,7 @@ static grub_err_t
|
|||
grub_dl_load_segments (grub_dl_t mod, const Elf_Ehdr *e)
|
||||
{
|
||||
unsigned i;
|
||||
Elf_Shdr *s;
|
||||
const Elf_Shdr *s;
|
||||
grub_size_t tsize = 0, talign = 1;
|
||||
#if !defined (__i386__) && !defined (__x86_64__)
|
||||
grub_size_t tramp;
|
||||
|
@ -232,9 +232,9 @@ grub_dl_load_segments (grub_dl_t mod, const Elf_Ehdr *e)
|
|||
#endif
|
||||
char *ptr;
|
||||
|
||||
for (i = 0, s = (Elf_Shdr *)((char *) e + e->e_shoff);
|
||||
for (i = 0, s = (const Elf_Shdr *)((const char *) e + e->e_shoff);
|
||||
i < e->e_shnum;
|
||||
i++, s = (Elf_Shdr *)((char *) s + e->e_shentsize))
|
||||
i++, s = (const Elf_Shdr *)((const char *) s + e->e_shentsize))
|
||||
{
|
||||
tsize = ALIGN_UP (tsize, s->sh_addralign) + s->sh_size;
|
||||
if (talign < s->sh_addralign)
|
||||
|
|
Loading…
Reference in a new issue