[MacPorts] #53910: xorg-server @1.18.4: repetitive crash. Can't kill it. Have to log out to stop it
MacPorts
noreply at macports.org
Mon Jul 17 23:34:40 UTC 2017
#53910: xorg-server @1.18.4: repetitive crash. Can't kill it. Have to log out to
stop it
--------------------------+----------------------
Reporter: bdbaddog | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: xorg-server |
--------------------------+----------------------
Comment (by PaulForgey):
This code as written will not work in clang. As addr->sa_data is a
char[14], it will always cause an overflow check. If you replace 'portlen'
with a constant like, say, 20, you'll get a warning explaining this will
happen.
Three ways to fix this:
1) #undef strncpy
2) do not use strncpy for the sa_data field of the abstract socket type
3) use an intermediate void pointer assigned to sa_data, then strncpy into
it
--
Ticket URL: <https://trac.macports.org/ticket/53910#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list