summaryrefslogtreecommitdiffstats
path: root/lib/libelf/libelf_memory.c
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2019-03-19 02:31:35 +0000
committerjsg <jsg@openbsd.org>2019-03-19 02:31:35 +0000
commite219834f801e78888637194a4612bc3229c35e9c (patch)
treeece88840597fee628eb13e775baea2f8321be30b /lib/libelf/libelf_memory.c
parentNuke a couple of XXX comments. (diff)
downloadwireguard-openbsd-e219834f801e78888637194a4612bc3229c35e9c.tar.xz
wireguard-openbsd-e219834f801e78888637194a4612bc3229c35e9c.zip
update libelf from elftoolchain r3669 to r3714
includes changes to address problems sunil@ found with fuzzing original diff from and ok sunil@
Diffstat (limited to 'lib/libelf/libelf_memory.c')
-rw-r--r--lib/libelf/libelf_memory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libelf/libelf_memory.c b/lib/libelf/libelf_memory.c
index 550211b689f..705bebe17b6 100644
--- a/lib/libelf/libelf_memory.c
+++ b/lib/libelf/libelf_memory.c
@@ -31,7 +31,7 @@
#include "_libelf.h"
-ELFTC_VCSID("$Id: libelf_memory.c,v 1.1 2019/02/01 05:27:38 jsg Exp $");
+ELFTC_VCSID("$Id: libelf_memory.c,v 1.2 2019/03/19 02:31:35 jsg Exp $");
/*
* Create an ELF descriptor for a memory image, optionally reporting
@@ -54,7 +54,7 @@ _libelf_memory(unsigned char *image, size_t sz, int reporterror)
e->e_cmd = ELF_C_READ;
e->e_rawfile = image;
- e->e_rawsize = sz;
+ e->e_rawsize = (off_t) sz;
#undef LIBELF_IS_ELF
#define LIBELF_IS_ELF(P) ((P)[EI_MAG0] == ELFMAG0 && \