--- src/metamail/metamail.c.old	2006-02-12 10:04:19.000000000 +0100
+++ src/metamail/metamail.c	2006-02-12 10:06:44.000000000 +0100
@@ -313,7 +313,7 @@ int nestingdepth;
             WroteSquirrelFile = 0;
         }
         LineBuf = XMALLOC(char, LINE_BUF_SIZE);
-        sprintf(LineBuf, "--%s", boundary);
+        snprintf(LineBuf, LINE_BUF_SIZE, "--%s", boundary);
         strcpy(boundary, LineBuf);
         boundarylen = strlen(boundary);
         if (BoundaryCt >= BoundaryAlloc) {
@@ -1730,7 +1730,7 @@ struct part **PartsWritten;
                         if (boundary[0] == '"') {
                             boundary=UnquoteString(boundary);
                         }
-                        sprintf(LineBuf, "--%s", boundary);
+                        snprintf(LineBuf, LINE_BUF_SIZE, "--%s", boundary);
                         strcpy(boundary, LineBuf);
                         boundarylen = strlen(boundary);
                         if (BoundaryCt >= BoundaryAlloc) {
