summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/glapi/glapi_getproc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/glapi/glapi_getproc.c b/src/mesa/glapi/glapi_getproc.c
index ec96ab36f0f..c73e8dd3b04 100644
--- a/src/mesa/glapi/glapi_getproc.c
+++ b/src/mesa/glapi/glapi_getproc.c
@@ -265,8 +265,7 @@ str_dup(const char *str)
copy = (char*) malloc(strlen(str) + 1);
if (!copy)
return NULL;
- strncpy(copy, str, strlen(str));
- copy[strlen(str)] = '\0';
+ strcpy(copy, str);
return copy;
}