From: Vinson Lee Date: Sat, 1 May 2010 22:34:47 +0000 (-0700) Subject: glapi: s/strcpy/strncpy/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9446fd8f69564e09ffd0f28735a99c510f84bb62;p=mesa.git glapi: s/strcpy/strncpy/ --- diff --git a/src/mesa/glapi/glapi_getproc.c b/src/mesa/glapi/glapi_getproc.c index c73e8dd3b04..ec96ab36f0f 100644 --- a/src/mesa/glapi/glapi_getproc.c +++ b/src/mesa/glapi/glapi_getproc.c @@ -265,7 +265,8 @@ str_dup(const char *str) copy = (char*) malloc(strlen(str) + 1); if (!copy) return NULL; - strcpy(copy, str); + strncpy(copy, str, strlen(str)); + copy[strlen(str)] = '\0'; return copy; }