]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Use read_UInt to get the CRC as it may not be aligned. Fixes #283154.
authorTom Hughes <tom@compton.nu>
Sun, 2 Oct 2011 10:22:08 +0000 (10:22 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 2 Oct 2011 10:22:08 +0000 (10:22 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12082

coregrind/m_debuginfo/readelf.c

index fd660047e031532f46a2182c226387bfcb48174e..c62cca92047c50b7559618141757004bca46769e 100644 (file)
@@ -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,