aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-05-03 13:16:11 -0600
committerBrian Paul <[email protected]>2010-05-03 13:16:11 -0600
commit6405ecb399a52e4d3fe0c002bcd9b3485cbd1360 (patch)
tree9be9431b2835e26f41f30a244cb3f2c1c25ff6ca /src
parentcc67bd87999814dbf8ecc3ef99b16dac66b4f320 (diff)
Revert "glapi: s/strcpy/strncpy/"
This reverts commit 9446fd8f69564e09ffd0f28735a99c510f84bb62. It doesn't make sense to replace strcpy(a,b) with strncpy(a,b,strlen(b)). The preceeding code effectively does bounds checking, btw.
Diffstat (limited to 'src')
-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;
}