This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug network/19622] New: Support aliasing with struct sockaddr


https://sourceware.org/bugzilla/show_bug.cgi?id=19622

            Bug ID: 19622
           Summary: Support aliasing with struct sockaddr
           Product: glibc
           Version: 2.24
            Status: NEW
          Severity: normal
          Priority: P2
         Component: network
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
  Target Milestone: ---
             Flags: security-

It is quite common to pass pointers to struct sockaddr_in and similar socket
structures to as struct sockaddr pointers, or to peak at a socket address
through a struct sockaddr pointer to look at the sa_family member to determine
the concrete socket address type.

This breaks strict aliasing.  Marek Polacek suggests to add the may_alias
attribute to struct sockaddr.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]