X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=menu.c;h=91abff1c0e350f1c0c6b99283d5d785ab8b13255;hp=1c4e7b954261ebe13df93207bc912078898c81c5;hb=b36dc16c428cc2b1371bb99c0581aa014f302791;hpb=eed5352e46df93f8921d2e6dfdc95b027bad6e1e diff --git a/menu.c b/menu.c index 1c4e7b9..91abff1 100644 --- a/menu.c +++ b/menu.c @@ -140,7 +140,7 @@ static void print_enriched_string (int attr, unsigned char *s, int do_color) static void menu_make_entry (char *s, int l, MUTTMENU * menu, int i) { if (menu->dialog) { - strncpy (s, menu->dialog[i], l); + m_strcpy(s, l, menu->dialog[i]); menu->current = -1; /* hide menubar */ } else @@ -682,7 +682,7 @@ static int menu_search (MUTTMENU * menu, int op) char buf[SHORT_STRING]; if (op != OP_SEARCH_NEXT && op != OP_SEARCH_OPPOSITE) { - strfcpy (buf, menu->searchBuf ? menu->searchBuf : "", sizeof (buf)); + m_strcpy(buf, sizeof(buf), NONULL(menu->searchBuf)); if (mutt_get_field ((op == OP_SEARCH) ? _("Search for: ") : _("Reverse search for: "), buf, sizeof (buf), M_CLEAR) != 0 || !buf[0])