summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2014-04-10 15:02:53 +0200
committerMark Wielaard <[email protected]>2014-04-14 15:27:04 +0200
commit110c273d35515ebcfba0c88ad70dbcd5548b0d3c (patch)
tree5e87170fab20d3c5ac9e564076d1c87cf9db2084 /src
parent66637fa21044ac0058b25522f473669e73de328b (diff)
readelf: convert up to a target long in buf_read_ulong.
Add a i686 corefile test. Reported-by: Markus Engel <[email protected]> Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/readelf.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c1662671..a6218e23 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2014-04-10 Mark Wielaard <[email protected]>
+
+ * readelf.c (buf_read_ulong): Pass actual long size to convert.
+
2014-03-05 Mark Wielaard <[email protected]>
* readelf.c (attr_callback): Print DW_FORM_sdata values as signed
diff --git a/src/readelf.c b/src/readelf.c
index d2efbaeb..ff8048ef 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -8736,7 +8736,7 @@ buf_read_ulong (Elf *core, unsigned char const **ptrp, unsigned char const *end,
uint32_t u32;
} u;
- *ptrp = convert (core, ELF_T_ADDR, 1, &u, *ptrp, sizeof u);
+ *ptrp = convert (core, ELF_T_ADDR, 1, &u, *ptrp, sz);
if (sz == 4)
*retp = u.u32;