diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-20 03:10:54 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-20 03:10:54 +0400 |
commit | 5cf593a778e3dca51a5ebd6b4c23ce6c7b0a7ac6 (patch) | |
tree | d5d8889ff9dcffa4c15b7160a8850d3f16b6562e /source/blender/nodes/intern/node_common.c | |
parent | 364fcde86d3cdcb09d075a0445fc2e1eb64170d5 (diff) |
strcpy() --> BLI_strncpy(), where source strings are not fixed and target size is known.
Diffstat (limited to 'source/blender/nodes/intern/node_common.c')
-rw-r--r-- | source/blender/nodes/intern/node_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c index 4dbf4b96b74..6214f39dc0a 100644 --- a/source/blender/nodes/intern/node_common.c +++ b/source/blender/nodes/intern/node_common.c @@ -718,7 +718,7 @@ static bNodeSocket *group_verify_socket(bNodeTree *ntree, ListBase *lb, int in_o if(sock) { sock->groupsock = gsock; - strcpy(sock->name, gsock->name); + BLI_strncpy(sock->name, gsock->name, sizeof(sock->name)); sock->type= gsock->type; /* XXX hack: group socket input/output roles are inverted internally, @@ -903,7 +903,7 @@ static void loop_sync(bNodeTree *ntree, int sync_in_out) if (mirror->own_index == GET_INT_FROM_POINTER(sock->storage)) break; /* make sure the name is the same (only for identification by user, no deeper meaning) */ - strcpy(mirror->name, sock->name); + BLI_strncpy(mirror->name, sock->name, sizeof(mirror->name)); /* fix the socket order if necessary */ if (mirror != sync) { BLI_remlink(sync_lb, mirror); |