Source-Changes-HG archive

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

[src/trunk]: src/bin/pax use sizeof for safety



details:   https://anonhg.NetBSD.org/src/rev/94b9f3e85597
branches:  trunk
changeset: 546928:94b9f3e85597
user:      itojun <itojun%NetBSD.org@localhost>
date:      Fri May 09 00:56:56 2003 +0000

description:
use sizeof for safety

diffstat:

 bin/pax/ftree.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r ebdf28978dc2 -r 94b9f3e85597 bin/pax/ftree.c
--- a/bin/pax/ftree.c   Fri May 09 00:48:59 2003 +0000
+++ b/bin/pax/ftree.c   Fri May 09 00:56:56 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ftree.c,v 1.24 2003/04/21 22:10:10 christos Exp $      */
+/*     $NetBSD: ftree.c,v 1.25 2003/05/09 00:56:56 itojun Exp $        */
 
 /*-
  * Copyright (c) 1992 Keith Muller.
@@ -78,7 +78,7 @@
 #if 0
 static char sccsid[] = "@(#)ftree.c    8.2 (Berkeley) 4/18/94";
 #else
-__RCSID("$NetBSD: ftree.c,v 1.24 2003/04/21 22:10:10 christos Exp $");
+__RCSID("$NetBSD: ftree.c,v 1.25 2003/05/09 00:56:56 itojun Exp $");
 #endif
 #endif /* not lint */
 
@@ -705,7 +705,7 @@
                         */
                        } else if ((cnt =
                            readlink(ftent->fts_path, arcn->ln_name,
-                           PAXPATHLEN-1)) < 0) {
+                           sizeof(arcn->ln_name) - 1)) < 0) {
                                syswarn(1, errno, "Unable to read symlink %s",
                                    ftent->fts_path);
                                continue;



Home | Main Index | Thread Index | Old Index