1 2 3 4 5 6 7 8
#include <stdio.h> #include <string.h> int main(int argc, char **argv) { char *buf; strlcpy(buf, "foo", sizeof buf); return 1; }