From: Cody P Schafer Date: Fri, 10 Aug 2012 22:22:55 +0000 (-0700) Subject: perf symbols: Avoid segfault in elf_strptr X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~97^2~31^2~32 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=492746546fe380da768c8496213e26aa91b9b3aa;p=pandora-kernel.git perf symbols: Avoid segfault in elf_strptr If we call elf_section_by_name() with a truncated elf image (ie: the file header indicates that the section headers are placed past the end of the file), elf_strptr() causes a segfault within libelf. Avoid this by checking that we can access the section string table properly. Should really be fixed in libelf/elfutils. Signed-off-by: Cody P Schafer Cc: David Hansen Cc: Ingo Molnar Cc: Matt Hellsley Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Sukadev Bhattiprolu Link: http://lkml.kernel.org/r/1344637382-22789-10-git-send-email-cody@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo --- Reading git-diff-tree failed