mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-27 04:09:31 +03:00
-check malloc rval
This commit is contained in:
@@ -149,6 +149,8 @@ static char* strcopy(const char *s, size_t len)
|
||||
{
|
||||
char *dst;
|
||||
dst = malloc(len+1);
|
||||
if (NULL == dst)
|
||||
abort ();
|
||||
memcpy(dst, s, len);
|
||||
dst[len] = '\0';
|
||||
return dst;
|
||||
|
||||
Reference in New Issue
Block a user