From 867fc4b463ef39ea16103f18f332c3d259624d29 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 13 Feb 2011 03:21:27 +0000 Subject: enforce string limits (reported by pedantic checking tools & some developers). mostly replace strcpy with BLI_strncpy and multiple strcat's with a BLI_snprintf(). also fix possible crash if CWD isnt available. --- source/blender/python/generic/IDProp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/python') diff --git a/source/blender/python/generic/IDProp.c b/source/blender/python/generic/IDProp.c index 9e4aa88354d..cd014fc34a8 100644 --- a/source/blender/python/generic/IDProp.c +++ b/source/blender/python/generic/IDProp.c @@ -201,7 +201,7 @@ static int BPy_IDGroup_SetName(BPy_IDProperty *self, PyObject *value, void *UNUS return -1; } - strcpy(self->prop->name, st); + BLI_strncpy(self->prop->name, st, sizeof(self->prop->name)); return 0; } -- cgit v1.2.3