This is coverity issue CID: 456
authorKent Mein <mein@cs.umn.edu>
Fri, 31 Oct 2008 14:15:35 +0000 (14:15 +0000)
committerKent Mein <mein@cs.umn.edu>
Fri, 31 Oct 2008 14:15:35 +0000 (14:15 +0000)
fixes a buffer overrun issue.

Kent

source/blender/src/interface.c

index 28baf87baa1eb60e98fdef79574a423a08cf9a4e..9decbd9a1ce8ab67b7b8f226e93db68eb2b37d69 100644 (file)
@@ -1808,7 +1808,7 @@ static int ui_do_but_TEX(uiBut *but)
                         ((G.qual & LR_COMMANDKEY) || (G.qual & LR_CTRLKEY)) && 
                         ((dev==XKEY) || (dev==CKEY) || (dev==VKEY)) ) {
                                 
                         ((G.qual & LR_COMMANDKEY) || (G.qual & LR_CTRLKEY)) && 
                         ((dev==XKEY) || (dev==CKEY) || (dev==VKEY)) ) {
                                 
-                       char buf[UI_MAX_DRAW_STR]={0};
+                       char buf[UI_MAX_DRAW_STR+1]={0};
                        
                        /* paste */
                        if (dev==VKEY) {
                        
                        /* paste */
                        if (dev==VKEY) {