diff options
author | glebius <glebius@FreeBSD.org> | 2012-06-05 20:08:59 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2012-06-05 20:08:59 +0000 |
commit | 7bbd1fbd36c9b9ef15effb74d2e22c60e2181703 (patch) | |
tree | 74ba71e7ae98180bb9df985367bf0d56943b38f4 /usr.sbin/pmcstat/pmcstat_log.c | |
parent | d8fe16555acf716efb93a54e59f705eaad5aaab1 (diff) | |
download | FreeBSD-src-7bbd1fbd36c9b9ef15effb74d2e22c60e2181703.zip FreeBSD-src-7bbd1fbd36c9b9ef15effb74d2e22c60e2181703.tar.gz |
Don't crash trying to load symbols from striped file.
PR: bin/167361
Submitted by: Slawa Olhovchenkov <slw zxy.spb.ru>
Silence from: jkoshy
Diffstat (limited to 'usr.sbin/pmcstat/pmcstat_log.c')
-rw-r--r-- | usr.sbin/pmcstat/pmcstat_log.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/pmcstat/pmcstat_log.c b/usr.sbin/pmcstat/pmcstat_log.c index 2ac52da..b7f5a23 100644 --- a/usr.sbin/pmcstat/pmcstat_log.c +++ b/usr.sbin/pmcstat/pmcstat_log.c @@ -564,6 +564,8 @@ pmcstat_image_add_symbols(struct pmcstat_image *image, Elf *e, } image->pi_symcount += newsyms; + if (image->pi_symcount == 0) + return; assert(newsyms <= nfuncsyms); |