summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2010-05-01 15:34:47 -0700
committerVinson Lee <[email protected]>2010-05-01 15:34:47 -0700
commit9446fd8f69564e09ffd0f28735a99c510f84bb62 (patch)
tree1ed8fb891b80565be8aac3c92af2146841cf25c5 /src/mesa
parent70c75310514ef16880e1e3fe9cca83ab646bae99 (diff)
glapi: s/strcpy/strncpy/
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/glapi/glapi_getproc.c3
1 files changed, 2 insertions, 1 deletions
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;
}