From: Mitchell Krome Date: Tue, 16 Dec 2014 02:16:12 +0000 (+1000) Subject: perf symbols: Fix use after free in filename__read_build_id X-Git-Tag: omap-for-v3.20/drop-legacy-3517~25^2~1^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ad74b41e56e4f7f42c6b765bc44428cd09310d7;p=pandora-kernel.git perf symbols: Fix use after free in filename__read_build_id In filename__read_build_id, phdr points to memory in buf, which gets realloced before a call to fseek that uses phdr->p_offset. This change stores the value of p_offset before buf is realloced, so the fseek can use the value safely. Signed-off-by: Mitchell Krome Cc: Jiri Olsa Cc: Ingo Molnar Cc: Jiri Olsa Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20141216021612.GA7199@mitchell Signed-off-by: Arnaldo Carvalho de Melo --- Reading git-diff-tree failed