projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70c7531
)
glapi: s/strcpy/strncpy/
author
Vinson Lee
<vlee@vmware.com>
Sat, 1 May 2010 22:34:47 +0000
(15:34 -0700)
committer
Vinson Lee
<vlee@vmware.com>
Sat, 1 May 2010 22:34:47 +0000
(15:34 -0700)
src/mesa/glapi/glapi_getproc.c
patch
|
blob
|
history
diff --git
a/src/mesa/glapi/glapi_getproc.c
b/src/mesa/glapi/glapi_getproc.c
index c73e8dd3b040a7ddfbce7ef59400ee3824b3d9c1..ec96ab36f0f7eff64d00292356416fb2e1ab63c9 100644
(file)
--- 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;
}