You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-mail/metamail/files/metamail-2.7.45.3-CVE-2006-...

41 lines
1.9 KiB

--- src/src/metamail/metamail.c.old 2006-03-14 10:13:35.000000000 -0800
+++ src/src/metamail/metamail.c 2006-03-14 10:11:52.000000000 -0800
@@ -313,7 +313,7 @@
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) {
@@ -1712,7 +1712,7 @@
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) {
--- src/metamail/metamail.c.old 2006-03-14 10:12:39.000000000 -0800
+++ src/metamail/metamail.c 2006-03-14 10:14:53.000000000 -0800
@@ -445,7 +445,7 @@
}
LineBuf = malloc(LINE_BUF_SIZE);
if (!LineBuf) ExitWithError(nomem);
- sprintf(LineBuf, "--%s", boundary);
+ snprintf(LineBuf, LINE_BUF_SIZE, "--%s", boundary);
strcpy(boundary, LineBuf);
boundarylen = strlen(boundary);
if (BoundaryCt >= BoundaryAlloc) {
@@ -2115,7 +2115,7 @@
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) {