http://defect.opensolaris.org/bz/show_bug.cgi?id=8084

           Summary: memset used with inverted arguments
    Classification: Development
           Product: power-mgmt
           Version: unspecified
          Platform: ANY/Generic
        OS/Version: Solaris
            Status: ACCEPTED
          Severity: major
          Priority: P2
         Component: powertop
        AssignedTo: rafael.vanoni at sun.com
        ReportedBy: rafael.vanoni at sun.com
                CC: tesla-dev at opensolaris.org


Halfway through powertop.c, in the may program loop we have

207             (void) memset(event_info, EVENT_NUM_MAX * sizeof
(event_info_t),
208                 0);
209             (void) memset(cstate_info, 2 * sizeof (state_info_t), 0);

but from the memset(3) man page:

    void *memset(void *s, int c, size_t n);

    The memset() function sets the first n bytes in memory  area
    s  to  the  value  of  c (converted to an unsigned char). It
    returns s.

A whale of a bug here.

-- 
Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Reply via email to