Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-07-15 09:11:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-15 09:11:14 +0400
commitbf77d35f695030506c1b70f2eb2a2f1225ce14cc (patch)
tree9f291fed3a06aa5fca9d14e13b04fff30302ba51 /source/blender/windowmanager
parent2b6f35d686a35a347aec93cae2f018b1f7312834 (diff)
fix for bad lengths being passed to string functions.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index b9a9d6b1957..981467cbba6 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -495,7 +495,7 @@ void WM_operator_py_idname(char *to, const char *from)
BLI_ascii_strtolower(to, ofs);
to[ofs] = '.';
- BLI_strncpy(to + (ofs + 1), sep + 4, OP_MAX_TYPENAME);
+ BLI_strncpy(to + (ofs + 1), sep + 4, OP_MAX_TYPENAME - (ofs + 1));
}
else {
/* should not happen but support just in case */
@@ -514,9 +514,8 @@ void WM_operator_bl_idname(char *to, const char *from)
memcpy(to, from, sizeof(char) * ofs);
BLI_ascii_strtoupper(to, ofs);
-
- BLI_strncpy(to + ofs, "_OT_", OP_MAX_TYPENAME);
- BLI_strncpy(to + (ofs + 4), sep + 1, OP_MAX_TYPENAME);
+ strcpy(to + ofs, "_OT_");
+ strcpy(to + (ofs + 4), sep + 1);
}
else {
/* should not happen but support just in case */