[Bf-blender-cvs] [238a270d8fd] master: Fix possible misuse of `BLI_strncpy`.
mano-wii
noreply at git.blender.org
Wed Sep 19 14:05:05 CEST 2018
Commit: 238a270d8fd63a096fdac86a1e24738ed8399443
Author: mano-wii
Date: Wed Sep 19 09:04:55 2018 -0300
Branches: master
https://developer.blender.org/rB238a270d8fd63a096fdac86a1e24738ed8399443
Fix possible misuse of `BLI_strncpy`.
Same issue as rB39f7c8256d58.
===================================================================
M source/blender/blenkernel/intern/suggestions.c
===================================================================
diff --git a/source/blender/blenkernel/intern/suggestions.c b/source/blender/blenkernel/intern/suggestions.c
index 043fc813b95..2e48599a113 100644
--- a/source/blender/blenkernel/intern/suggestions.c
+++ b/source/blender/blenkernel/intern/suggestions.c
@@ -246,12 +246,12 @@ void texttool_docs_show(const char *docs)
/* Ensure documentation ends with a '\n' */
if (docs[len - 1] != '\n') {
documentation = MEM_mallocN(len + 2, "Documentation");
- BLI_strncpy(documentation, docs, len);
+ memcpy(documentation, docs, len);
documentation[len++] = '\n';
}
else {
documentation = MEM_mallocN(len + 1, "Documentation");
- BLI_strncpy(documentation, docs, len);
+ memcpy(documentation, docs, len);
}
documentation[len] = '\0';
}
More information about the Bf-blender-cvs
mailing list