ESAPI-C 1.0
The OWASP Enterprise Security API for C

local_strdup.c

Go to the documentation of this file.
00001 
00008 #include <stdlib.h>
00009 #include <string.h>
00010 
00011 char *( local_strdup)(const char *instr) {
00012         size_t instr_len = 1 + strlen(instr);
00013         char *newstr = (char *) malloc(instr_len);
00014         return newstr ? memcpy(newstr, instr, instr_len) : 0;
00015 }
00016 
 All Data Structures Files Functions Variables Typedefs Defines