Fix #27359: Pasting long text crashes blender
[blender-staging.git] / source / blender / editors / interface / interface_widgets.c
index ecadb52ad5d0a16a84d3d9dfbd2c523c291780aa..58ed1e31b8179335cc338768feb5b12bf798c6df 100644 (file)
@@ -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));