[LLVMdev] Handling of unsafe functions

Florian Weimer fweimer at redhat.com
Thu Sep 27 05:26:20 PDT 2012


On 09/21/2012 05:52 AM, Martinez, Javier E wrote:

> The proposal comments have largely centered on the string functions. Do
> people feel the same way about memcpy_s? What about those of you
> building LLVM on Windows with Visual Studio?

Is memcmp_s (or a variant thereof) a win in practice?  It covers the 
case pretty well where you try to copy a dynamically sized buffer to the 
start of a statically sized one.  I don't want to say that it doesn't 
happen, but it seems to be rather rare, and I expect most calls to 
memcpy_s would use the same expression for both sizes.

-- 
Florian Weimer / Red Hat Product Security Team



More information about the llvm-dev mailing list