Initialize the marker for the data segment, in case the caller passes not
fully initialized markers to loadfile(). Pointed out by Mark Cave-Ayland.
This commit is contained in:
parent
a0b0e269b3
commit
f4a9b09e6c
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: loadfile_elf32.c,v 1.31 2015/07/25 07:06:11 isaki Exp $ */
|
||||
/* $NetBSD: loadfile_elf32.c,v 1.32 2016/08/31 16:22:37 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 2008 The NetBSD Foundation, Inc.
|
||||
|
@ -279,6 +279,9 @@ ELFNAMEEND(loadfile)(int fd, Elf_Ehdr *elf, u_long *marks, int flags)
|
|||
/* some ports dont use the offset */
|
||||
(void)&offset;
|
||||
|
||||
/* have not seen a data segment so far */
|
||||
marks[MARK_DATA] = 0;
|
||||
|
||||
internalize_ehdr(elf->e_ident[EI_DATA], elf);
|
||||
|
||||
sz = elf->e_phnum * sizeof(Elf_Phdr);
|
||||
|
|
Loading…
Reference in New Issue