From: Tom Hughes Date: Sun, 2 Oct 2011 10:22:08 +0000 (+0000) Subject: Use read_UInt to get the CRC as it may not be aligned. Fixes #283154. X-Git-Tag: svn/VALGRIND_3_7_0~155 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c5b862917131c676a8e145162a2412556f689b32;p=thirdparty%2Fvalgrind.git Use read_UInt to get the CRC as it may not be aligned. Fixes #283154. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12082 --- diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c index fd660047e0..c62cca9204 100644 --- a/coregrind/m_debuginfo/readelf.c +++ b/coregrind/m_debuginfo/readelf.c @@ -2218,7 +2218,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) vg_assert(crc_offset + sizeof(UInt) <= debuglink_sz); /* Extract the CRC from the debuglink section */ - crc = *(UInt *)(debuglink_img + crc_offset); + crc = ML_(read_UInt)(debuglink_img + crc_offset); /* See if we can find a matching debug file */ find_debug_file( di, di->fsm.filename, buildid,