Source-Changes-HG archive

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

[src/netbsd-1-6]: src/usr.sbin/pkg_install/add Pull up revision 1.24 (request...



details:   https://anonhg.NetBSD.org/src/rev/13d2d9f3329e
branches:  netbsd-1-6
changeset: 528259:13d2d9f3329e
user:      lukem <lukem%NetBSD.org@localhost>
date:      Fri Jun 28 12:42:49 2002 +0000

description:
Pull up revision 1.24 (requested by taca in ticket #369):
- fix buffer size checks
- define PKG_PATTEN_MAX and PKG_SUFFIX_MAX and
  use them instead of constants like 255.
- add asserts and buffer size checks.
- constify and make WARNS=2 clean.
- Fixes provided by Stoned Elipot <seb%script.jussieu.fr@localhost> in PR 17323

diffstat:

 usr.sbin/pkg_install/add/main.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r 7e5e333cea70 -r 13d2d9f3329e usr.sbin/pkg_install/add/main.c
--- a/usr.sbin/pkg_install/add/main.c   Fri Jun 28 12:42:40 2002 +0000
+++ b/usr.sbin/pkg_install/add/main.c   Fri Jun 28 12:42:49 2002 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: main.c,v 1.23 2001/09/25 10:28:16 agc Exp $    */
+/*     $NetBSD: main.c,v 1.23.2.1 2002/06/28 12:42:49 lukem Exp $      */
 
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char *rcsid = "from FreeBSD Id: main.c,v 1.16 1997/10/08 07:45:43 charnier Exp";
 #else
-__RCSID("$NetBSD: main.c,v 1.23 2001/09/25 10:28:16 agc Exp $");
+__RCSID("$NetBSD: main.c,v 1.23.2.1 2002/06/28 12:42:49 lukem Exp $");
 #endif
 #endif
 
@@ -153,6 +153,7 @@
                                                    char tmp[FILENAME_MAX];
                                                    
                                                    snprintf(tmp, sizeof(tmp), "%s/%s", dirname_of(*argv), s);
+                                                       free(s);
                                                    
                                                    if (Verbose)
                                                            printf("Using %s for %s\n", tmp, *argv);
@@ -207,6 +208,7 @@
                                                char tmp2[FILENAME_MAX];
                                                
                                                snprintf(tmp2, sizeof(tmp2), "%s/%s", dirname_of(tmp), s);
+                                               free(s);
                                                
                                                if (Verbose)
                                                        printf("Using %s for %s\n", tmp2, *argv);



Home | Main Index | Thread Index | Old Index