summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2012-06-05 20:08:59 +0000
committerglebius <glebius@FreeBSD.org>2012-06-05 20:08:59 +0000
commit7bbd1fbd36c9b9ef15effb74d2e22c60e2181703 (patch)
tree74ba71e7ae98180bb9df985367bf0d56943b38f4 /usr.sbin
parentd8fe16555acf716efb93a54e59f705eaad5aaab1 (diff)
downloadFreeBSD-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')
-rw-r--r--usr.sbin/pmcstat/pmcstat_log.c2
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);
OpenPOWER on IntegriCloud