From 6405ecb399a52e4d3fe0c002bcd9b3485cbd1360 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 3 May 2010 13:16:11 -0600 Subject: 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. --- src/mesa/glapi/glapi_getproc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/glapi/glapi_getproc.c b/src/mesa/glapi/glapi_getproc.c index ec96ab36f0..c73e8dd3b0 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; } -- cgit v1.2.3