<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'> <html xmlns='http://www.w3.org/1999/xhtml'> <head> <title>len</title> <meta name='robots' content='noindex,nofollow' /> <meta name='generator' content='GLOBAL-6.6.5' /> <meta http-equiv='Content-Style-Type' content='text/css' /> <link rel='stylesheet' type='text/css' href='../style.css' /> </head> <body> <pre> <span class='curline'><a href='../S/2424.html#L68'>len</a> 68 include/cmem.h char *strndup_chk(const char *s, size_t len, const char *tag);</span> <span class='curline'><a href='../S/2831.html#L33'>len</a> 33 src/cmem.c char *strndup_chk(const char *s, size_t len, const char *tag)</span> <span class='curline'><a href='../S/2831.html#L38'>len</a> 38 src/cmem.c if(len < strlen(s)) {</span> <span class='curline'><a href='../S/2831.html#L39'>len</a> 39 src/cmem.c t = malloc_chk(len + 1, tag);</span> <span class='curline'><a href='../S/2831.html#L40'>len</a> 40 src/cmem.c strncpy(t, s, len);</span> <span class='curline'><a href='../S/2831.html#L41'>len</a> 41 src/cmem.c t[len] = '\0';</span> <span class='curline'><a href='../S/986.html#L6'>len</a> 6 test/unit/strndup_chk/cmd.c size_t len = 10;</span> <span class='curline'><a href='../S/986.html#L8'>len</a> 8 test/unit/strndup_chk/cmd.c dst = strndup_chk(src, len, "strndup_chk unit test");</span> </pre> </body> </html>