[llvm-bugs] [Bug 37687] New: Incorrect destination buffer size calculation for strlcat
llvm-bugs at lists.llvm.org
Tue Jun 5 04:41:56 PDT 2018
Bug ID: 37687
Summary: Incorrect destination buffer size calculation for
Component: Static Analyzer
Assignee: dcoughlin at apple.com
Reporter: edwin.mons at isode.com
CC: llvm-bugs at lists.llvm.org
Created attachment 20396
Additional test for bsd-string.cpp
I noticed a lot of analyzer noise on a scan-build run after an upgrade to a
recent Clang trunk build, all complaining about strlcat, and all look like they
are false positives. In short, it will complain about strlcat(dest, src,
sizeof(dest)), which according to the BSD manuals is a correct way to use this
function. I suspect size is checked as if it concerned strncat. An addition
to the check-clang-analyzer test suite is attached.
I reproduced this on Debian 9 using clang trunk (checked out using git, commit
e6a11c7e15). I don't think this is platform-specific.
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs