Author: emaste
Date: Mon Nov  4 22:52:02 2019
New Revision: 354342
URL: https://svnweb.freebsd.org/changeset/base/354342

Log:
  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

Modified:
  head/lib/libpmc/pmu-events/jevents.c

Modified: head/lib/libpmc/pmu-events/jevents.c
==============================================================================
--- head/lib/libpmc/pmu-events/jevents.c        Mon Nov  4 21:23:30 2019        
(r354341)
+++ head/lib/libpmc/pmu-events/jevents.c        Mon Nov  4 22:52:02 2019        
(r354342)
@@ -122,7 +122,7 @@ static void fixdesc(char *s)
        --e;
        while (e >= s && isspace(*e))
                --e;
-       if (*e == '.')
+       if (e >= s && *e == '.')
                *e = 0;
 }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to