use BLI_strncpy and BLI_snprintf when the size of the string is known.
[blender-staging.git] / source / blender / editors / space_outliner / outliner_edit.c
index 9b1bd1d7b3181a3b40edaaa491e45ab403cfbd52..0ccbf9127c6bacea87bf2d3c8fff4c869bc69704 100644 (file)
@@ -749,7 +749,7 @@ static void outliner_find_panel(Scene *UNUSED(scene), ARegion *ar, SpaceOops *so
        TreeElement *last_find;
        TreeStoreElem *tselem;
        int ytop, xdelta, prevFound=0;
-       char name[32];
+       char name[sizeof(soops->search_string)];
        
        /* get last found tree-element based on stored search_tse */
        last_find= outliner_find_tse(soops, &soops->search_tse);
@@ -803,7 +803,7 @@ static void outliner_find_panel(Scene *UNUSED(scene), ARegion *ar, SpaceOops *so
                        /* store selection */
                        soops->search_tse= *tselem;
                        
-                       BLI_strncpy(soops->search_string, name, 33);
+                       BLI_strncpy(soops->search_string, name, sizeof(soops->search_string));
                        soops->search_flags= flags;
                        
                        /* redraw */