Hi!

This turned out to be a problem in the dctime function.  It was converted
to using snprintf, but the buffer length was not increased to allow for
the null character snprintf places at the last position of the buffer.
The newline was thus discarded by snprintf and a null was stored in its
place.

The attached patch fixes this (and any similar problem mhl might have).

Cheers,
+ Kim

| From: [EMAIL PROTECTED] (Jerry Peek)
| Date: 21 Feb 99 03:15:16 GMT
| 
| Synopsis: When "packf -mbox" makes a "From " line from a "Return-Path:"
| field, the resulting line isn't newline-terminated.
$NetBSD: patch-cd,v 1.1 1999/03/06 20:37:32 kim Exp $

--- zotnet/tws/dtime.c.orig     Sun Jul 12 16:16:33 1998
+++ zotnet/tws/dtime.c  Sat Mar  6 15:17:04 1999
@@ -247,7 +247,7 @@
 char *
 dctime (struct tws *tw)
 {
-    static char buffer[25];
+    static char buffer[26];
 
     if (!tw)
        return NULL;

Reply via email to