fix for incorrect size passed to BLI_strncpy().
authorCampbell Barton <ideasman42@gmail.com>
Mon, 7 Oct 2013 19:45:13 +0000 (19:45 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 7 Oct 2013 19:45:13 +0000 (19:45 +0000)
source/blender/windowmanager/intern/wm_dragdrop.c

index 3e2d01d6e807fa5e8153b201598e855f43f3a323..4c58089f4e74b54bfd219d9740bd956a48045478 100644 (file)
@@ -226,13 +226,13 @@ static void wm_drop_operator_options(bContext *C, wmDrag *drag, wmEvent *event)
        
        /* check buttons (XXX todo rna and value) */
        if (UI_but_active_drop_name(C) ) {
-               strcpy(drag->opname, IFACE_("Paste name"));
+               BLI_strncpy(drag->opname, IFACE_("Paste name"), sizeof(drag->opname));
        }
        else {
                const char *opname = wm_dropbox_active(C, drag, event);
                
                if (opname) {
-                       BLI_strncpy(drag->opname, opname, FILE_MAX);
+                       BLI_strncpy(drag->opname, opname, sizeof(drag->opname));
                        // WM_cursor_modal_set(win, CURSOR_COPY);
                }
                // else