perf tools: Ensure sscanf does not overrun the "mem" field
perf tools: Ensure sscanf does not overrun the "mem" field

Make the parsing robust.

(perf has some other assumptions that BUFSIZE <= MAX_PATH which are
 not touched here)

Reported-by: Jackie Chang
Signed-off-by: Alan Cox <91e38e63b890fbb214c8914809fde03c73e7f24d@linux.intel.com>
Cc: Alan Cox <71add150d99de1bd5a1ceb2e3464b76ba775ecb5@lxorguk.ukuu.org.uk>
Cc: Peter Zijlstra <3fddac958924aef220f202ca567388ddab3f14a8@infradead.org>
Link: 0ebe3c45f002aaff814ef74be75f9a69c0769cc2@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <293abb6b76d7791c0732cc517d38c4b5c734b87f@redhat.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs