On 05/19/2015 12:22 PM, Borislav Petkov wrote: > > I guess I'm trying to find out why don't we have a BIG FAT WARNING over > memcpy saying not to use it with overlapping buffers and larger than > byte sizes. Or maybe this is something everyone, except me, just knows > and that's a "Doh, Boris, of course!". >
It kind of is, and doesn't just apply to kernel programming. In C99+ the memcpy() prototype has "restrict" in it to denote that memcpy() buffers have to be non-overlapping. -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/