X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=nntp%2Fnewsrc.c;h=ff9df9e0e1c9048998dcab9018a0038526ed85a4;hp=1f9bd5b7c531c6b38d7b5584436c97e3caefbeb5;hb=c6b9d35ed9361e4defab9762a7480d5126405ae9;hpb=ae0ce4dfcafa0c3820f107c5bfa8bd06e5272b57 diff --git a/nntp/newsrc.c b/nntp/newsrc.c index 1f9bd5b..ff9df9e 100644 --- a/nntp/newsrc.c +++ b/nntp/newsrc.c @@ -265,7 +265,7 @@ const char *nntp_format_str (char *dest, size_t destlen, char op, switch (op) { case 's': - strncpy (fn, NewsServer, sizeof (fn) - 1); + m_strcpy(fn, sizeof (fn), NewsServer); str_tolower (fn); snprintf (tmp, sizeof (tmp), "%%%ss", fmt); snprintf (dest, destlen, tmp, fn); @@ -656,8 +656,8 @@ static int mutt_update_list_file (char *filename, char *section, * via rename(2); as dirname(2) may modify its argument, * temporarily use buf as copy of it */ - strncpy (buf, filename, sizeof (buf)); - strncpy (tmpfile, basename (filename), sizeof (tmpfile)); + m_strcpy(buf, sizeof(buf), filename); + m_strcpy(tmpfile, sizeof(tmpfile), basename(filename)); mutt_adv_mktemp ((const char*) dirname (buf), tmpfile, sizeof (tmpfile)); debug_print (1, ("Opening %s\n", tmpfile)); if (!(ofp = fopen (tmpfile, "w"))) { @@ -1114,7 +1114,7 @@ void nntp_buffy (char* dst, size_t dstlen) { if (!unread) continue; } - strncpy (dst, data->group, dstlen); + m_strcpy(dst, dstlen, data->group); break; } }