mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 01:18:06 +02:00
glapi: s/strcpy/strncpy/
This commit is contained in:
parent
70c7531051
commit
9446fd8f69
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue