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:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-05-12 20:49:53 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-05-12 20:49:53 +0400
commit1d6278f80a62191a4b2259f4da5d82945a396c6f (patch)
treef0794bd198ee11a696ea21c13ef0787c97a4c98f /source/blender
parent5f5cdf9d00ddae944d3c50c2d0d7ecbed186d319 (diff)
Fix #27359: Pasting long text crashes blender
Actual problem was caused by insufficient buffer size in ui_text_leftclip() Also fixed possible invalid memory write in GHOST_SystemWin32::getClipboard which was caused by accessing clipboard buffer after closing clipboard. This mustn't happen. Also fixed possible crush when buffer was failed to be locked.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/interface/interface_widgets.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index ecadb52ad5d..58ed1e31b81 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -888,7 +888,7 @@ static void ui_text_leftclip(uiFontStyle *fstyle, uiBut *but, rcti *rect)
/* textbut exception, clip right when... */
if(but->editstr && but->pos >= 0) {
float width;
- char buf[256];
+ char buf[UI_MAX_DRAW_STR];
/* copy draw string */
BLI_strncpy(buf, but->drawstr, sizeof(buf));