Fix more potential seg-faults in gprof.
authorNick Clifton <nickc@redhat.com>
Tue, 30 Aug 2016 12:38:54 +0000 (13:38 +0100)
committerNick Clifton <nickc@redhat.com>
Tue, 30 Aug 2016 12:38:54 +0000 (13:38 +0100)
commit00927233079d1d65826fd611019e9167706b9ec6
treec6807426548726e78bb0c0dafde5a25678189d33
parent8941017bc0226b60ce306d5271df15820ce66a53
Fix more potential seg-faults in gprof.

PR gprof/20499
* corefile.c (num_of_syms_in): Return an unsigned int.
(core_create_syms_from): Catch a possible integer overflow
computing the argument to xmalloc.  Also allow for the possibility
that an integer overflow in num_of_syms_in means that less space
has been allocated than expected.
gprof/ChangeLog
gprof/corefile.c