]> 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:18 +0000 (18:29 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Wed, 19 Oct 2016 17:29:18 +0000 (18:29 +0100)
sbr/seq_list.c

index b64e8cd8d03d4363e8fcccb186d1fc2f6a6ca88b..268c25944792a1a98e1d614c4dd9f21a2af9190e 100644 (file)
@@ -39,7 +39,7 @@ seq_list(struct msgs *mp, char *seqname)
      */
     if (!strcmp (current, seqname)) {
        if (mp->curmsg) {       
      */
     if (!strcmp (current, seqname)) {
        if (mp->curmsg) {       
-           sprintf(buffer, "%s", m_name(mp->curmsg));
+           snprintf(buffer, len, "%s", m_name(mp->curmsg));
            return (buffer);
        } else
            return (NULL);
            return (buffer);
        } else
            return (NULL);