libpmc: jevents: handle empty descriptoin

PR:		241258
Reported by:	sigsys @ gmail.com
Obtained from:	github.com/andikleen/pmu-tools commit bb3c77ed61
MFC after:	3 days
This commit is contained in:
Ed Maste 2019-11-04 22:52:02 +00:00
parent d4f55cc861
commit 6a2a926d5f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354342

View File

@ -122,7 +122,7 @@ static void fixdesc(char *s)
--e;
while (e >= s && isspace(*e))
--e;
if (*e == '.')
if (e >= s && *e == '.')
*e = 0;
}