From 85026c42ec8ff853e10f03d28c95c12433fa776e Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Fri, 12 Nov 2004 21:13:59 +0000 Subject: sprintf -> snprintf svn path=/trunk/; revision=4003 --- unmime.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/unmime.c b/unmime.c index 5bc8f2b0..5a442cb5 100644 --- a/unmime.c +++ b/unmime.c @@ -668,10 +668,11 @@ int main(int argc, char *argv[]) FILE *fd_orig, *fd_conv; char fnam[100]; + /* we don't need snprintf here, but for consistency, we'll use it */ pid = getpid(); - sprintf(fnam, "/tmp/i_unmime.%lx", (long)pid); + snprintf(fnam, sizeof(fnam), "/tmp/i_unmime.%lx", (long)pid); fd_orig = fopen(fnam, "w"); - sprintf(fnam, "/tmp/o_unmime.%lx", (long)pid); + snprintf(fnam, sizeof(fnam), "/tmp/o_unmime.%lx", (long)pid); fd_conv = fopen(fnam, "w"); #endif -- cgit v1.2.3