]> diplodocus.org Git - nmh/commitdiff
Use the imperfect snprintf(3) instead of sprintf(3).
authorRalph Corderoy <ralph@inputplus.co.uk>
Wed, 19 Oct 2016 17:29:43 +0000 (18:29 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Wed, 19 Oct 2016 17:29:43 +0000 (18:29 +0100)
sbr/m_maildir.c

index 1fca93c..13bea08 100644 (file)
@@ -81,7 +81,7 @@ exmaildir (char *folder)
     cp = mailfold;
     if ((pp = context_find ("path")) && *pp) {
        if (*pp != '/') {
-           sprintf (cp, "%s/", mypath);
+           snprintf(cp, sizeof mailfold, "%s/", mypath);
            cp += strlen (cp);
        }
        cp = copy (pp, cp);