[Bug 196668] sysutils/logrotate: segmentation fault due to differences in qsort_r implementations

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Jan 13 04:23:49 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196668

            Bug ID: 196668
           Summary: sysutils/logrotate: segmentation fault due to
                    differences in qsort_r implementations
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs at FreeBSD.org
          Reporter: jyoung15 at gmail.com
                CC: js at iksz.hu
             Flags: maintainer-feedback?(js at iksz.hu)
                CC: js at iksz.hu

sysutils/logrotate 3.8.8 causes a segmentation fault.  SVN r450 upstream
introduced sortGlobResult, which uses qsort_r.  Linux and FreeBSD have
different implementations of this function:

Linux:
     void qsort_r(void *base, size_t nmemb, size_t size,
                  int (*compar)(const void *, const void *, void *),
                  void *arg);
FreeBSD:
     void qsort_r(void *base, size_t nmemb, size_t size, void *thunk,
                  int (*compar)(void *, const void *, const void *));


Note differences in location of thunk/arg and compar function pointer. Proposed
patch attached.

--- Comment #1 from Bugzilla Automation <bugzilla at FreeBSD.org> ---
Maintainer CC'd

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list