len 68 include/cmem.h char *strndup_chk(const char *s, size_t len, const char *tag); len 33 src/cmem.c char *strndup_chk(const char *s, size_t len, const char *tag) len 38 src/cmem.c if(len < strlen(s)) { len 39 src/cmem.c t = malloc_chk(len + 1, tag); len 40 src/cmem.c strncpy(t, s, len); len 41 src/cmem.c t[len] = '\0'; len 6 test/unit/strndup_chk/cmd.c size_t len = 10; len 8 test/unit/strndup_chk/cmd.c dst = strndup_chk(src, len, "strndup_chk unit test");