[llvm-bugs] [Bug 30346] New: REGRESSION: clang-3.8+ do not work well with _FORTIFY_SOURCE and struct socket with addresses > 14 bytes
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Sep 10 22:51:52 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=30346
Bug ID: 30346
Summary: REGRESSION: clang-3.8+ do not work well with
_FORTIFY_SOURCE and struct socket with addresses > 14
bytes
Product: clang
Version: 3.8
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: jeremyhu at apple.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 17237
--> https://llvm.org/bugs/attachment.cgi?id=17237&action=edit
reproduction test case
If _FORTIFY_SOURCE is on, strncpy() will abort incorrectly when dealing with a
`sa_data` field in `struct sockaddr` that is larger than 14 bytes. clang
incorrectly determines the size of the field to be statically 14.
This was noticed in X11 with the logic in libxtrans. I've prepared a
simplified test case.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160911/be58763f/attachment.html>
More information about the llvm-bugs
mailing list