From 58587a38818b0dba25886c97d584285fef4e9249 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 26 Sep 2011 18:51:10 +0000 Subject: replace strncpy with BLI_strncpy, in some cases strncpy was being misused since it doesnt ensure \0 termination. also dont call CTX_data_scene() twice when checking for function arguments. --- source/blender/editors/armature/poselib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/armature') diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index 8a7d837d2a8..bf2e17c4e87 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -993,7 +993,7 @@ static void poselib_preview_apply (bContext *C, wmOperator *op) memcpy(&tempstr[index+1], &pld->searchstr[index], 64-index); } else { - strncpy(tempstr, pld->searchstr, 64); + BLI_strncpy(tempstr, pld->searchstr, sizeof(tempstr)); } /* get marker name */ -- cgit v1.2.3