X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=state.c;h=eb0a9c70000c583b7c41bf188ddcb2deb286b583;hp=2f0c8f7bfd1c10b3eb0c810a6a6950e6f16b5d6e;hb=22116d7063ab4d7de33946d74ab8b9cbc0f3f6ef;hpb=2293e9bc5a94ef33dc596b064c607d6bed5ad1fd diff --git a/state.c b/state.c index 2f0c8f7..eb0a9c7 100644 --- a/state.c +++ b/state.c @@ -6,13 +6,8 @@ * It's licensed under the GNU General Public License, * please see the file GPL in the top level source directory. */ -#if HAVE_CONFIG_H -#include "config.h" -#endif -#include -#include -#include +#include #include @@ -92,8 +87,8 @@ void state_prefix_putc (char c, STATE * s) for (i = 0; i < offset; i++) if (Quotebuf[i] != ' ') j = i; - strncpy (buf, Quotebuf, j + 1); - strcpy (buf + j + 1, Quotebuf + j); + m_strncpy(buf, sizeof(buf), Quotebuf, j + 1); + m_strcpy(buf + j + 1, sizeof(buf) - j - 1, Quotebuf + j); } else snprintf (buf, sizeof (buf), "%s%s", NONULL (s->prefix), Quotebuf);