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/lib Pull up revision 1.33 (request...



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

description:
Pull up revision 1.33 (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/lib/plist.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (44 lines):

diff -r 7f7ad9968200 -r d2567a130130 usr.sbin/pkg_install/lib/plist.c
--- a/usr.sbin/pkg_install/lib/plist.c  Fri Jun 28 12:42:23 2002 +0000
+++ b/usr.sbin/pkg_install/lib/plist.c  Fri Jun 28 12:42:32 2002 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: plist.c,v 1.32 2002/03/05 13:01:21 agc Exp $   */
+/*     $NetBSD: plist.c,v 1.32.2.1 2002/06/28 12:42:32 lukem Exp $     */
 
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static const char *rcsid = "from FreeBSD Id: plist.c,v 1.24 1997/10/08 07:48:15 charnier Exp";
 #else
-__RCSID("$NetBSD: plist.c,v 1.32 2002/03/05 13:01:21 agc Exp $");
+__RCSID("$NetBSD: plist.c,v 1.32.2.1 2002/06/28 12:42:32 lukem Exp $");
 #endif
 #endif
 
@@ -43,7 +43,7 @@
 }       cmd_t;
 
 /* Commands to recognise */
-static cmd_t cmdv[] = {
+static const cmd_t cmdv[] = {
        {"cwd", PLIST_CWD, 1, 1},
        {"src", PLIST_SRC, 1, 1},
        {"cd", PLIST_CWD, 1, 1},
@@ -230,7 +230,7 @@
 int
 plist_cmd(char *s, char **arg)
 {
-       cmd_t  *cmdp;
+       const cmd_t *cmdp;
        char    cmd[FILENAME_MAX + 20]; /* 20 == fudge for max cmd len */
        char   *cp;
        char   *sp;
@@ -293,7 +293,7 @@
 write_plist(package_t *pkg, FILE * fp, char *realprefix)
 {
        plist_t *p;
-       cmd_t  *cmdp;
+       const cmd_t *cmdp;
 
        for (p = pkg->head; p; p = p->next) {
                if (p->type == PLIST_FILE) {



Home | Main Index | Thread Index | Old Index