[LLVMbugs] [Bug 23153] New: clang-check warn on suspect strncpy (etc.)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Apr 7 12:25:51 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23153

            Bug ID: 23153
           Summary: clang-check warn on suspect strncpy (etc.)
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: bill.torpey at ullink.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I haven't been able to find an answer to this question, so thought I would ask
it here.

Can clang's static analysis find bugs of this sort:


void func(char* arg)
{
  char buf1[10];
  char buf2[20];

  strncpy(buf1, arg, sizeof(buf2));
}

It doesn't appear to, but I want to make sure I'm not missing something.

TIA!

-- 
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/20150407/35cff270/attachment.html>


More information about the llvm-bugs mailing list