Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/comsat Fix off by one reported by David A. Holland i...



details:   https://anonhg.NetBSD.org/src/rev/f58617f36e7e
branches:  trunk
changeset: 569979:f58617f36e7e
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Sep 15 08:44:02 2004 +0000

description:
Fix off by one reported by David A. Holland in PR bin/26778.

diffstat:

 libexec/comsat/comsat.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r fdf4a1a699b0 -r f58617f36e7e libexec/comsat/comsat.c
--- a/libexec/comsat/comsat.c   Wed Sep 15 07:04:21 2004 +0000
+++ b/libexec/comsat/comsat.c   Wed Sep 15 08:44:02 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: comsat.c,v 1.31 2004/07/10 07:11:38 enami Exp $        */
+/*     $NetBSD: comsat.c,v 1.32 2004/09/15 08:44:02 martin Exp $       */
 
 /*
  * Copyright (c) 1980, 1993
@@ -36,7 +36,7 @@
 #if 0
 static char sccsid[] = "from: @(#)comsat.c     8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: comsat.c,v 1.31 2004/07/10 07:11:38 enami Exp $");
+__RCSID("$NetBSD: comsat.c,v 1.32 2004/09/15 08:44:02 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -223,7 +223,7 @@
                char maildir[MAXPATHLEN];
                int l = snprintf(maildir, sizeof(maildir), ":%s/%s",
                    _PATH_MAILDIR, name);
-               if (l > sizeof(maildir) || strcmp(maildir, fn) != 0)
+               if (l >= sizeof(maildir) || strcmp(maildir, fn) != 0)
                        return;
        }
        for (ep = utmp; ep != NULL; ep = ep->next)



Home | Main Index | Thread Index | Old Index