CVS commit: src/lib/libterminfo
Module Name:src Committed By: roy Date: Wed Sep 22 06:10:51 UTC 2010 Modified Files: src/lib/libterminfo: term.h term_private.h termcap.c termcap_map.c tparm.c Log Message: Our API just uses typedefs, so don't use the struct symbol which will avoid any potential conflicts with userland. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libterminfo/term.h cvs rdiff -u -r1.7 -r1.8 src/lib/libterminfo/term_private.h cvs rdiff -u -r1.8 -r1.9 src/lib/libterminfo/termcap.c cvs rdiff -u -r1.2 -r1.3 src/lib/libterminfo/termcap_map.c cvs rdiff -u -r1.1 -r1.2 src/lib/libterminfo/tparm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libterminfo/term.h diff -u src/lib/libterminfo/term.h:1.5 src/lib/libterminfo/term.h:1.6 --- src/lib/libterminfo/term.h:1.5 Fri Feb 26 00:09:00 2010 +++ src/lib/libterminfo/term.h Wed Sep 22 06:10:51 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: term.h,v 1.5 2010/02/26 00:09:00 roy Exp $ */ +/* $NetBSD: term.h,v 1.6 2010/09/22 06:10:51 roy Exp $ */ /* * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. @@ -1449,7 +1449,7 @@ #define zero_motion t_zero_motion(cur_term) #ifndef _TERMINFO -typedef struct terminal { +typedef struct { int fildes; /* We need to expose these so that the macros work */ const char *name; Index: src/lib/libterminfo/term_private.h diff -u src/lib/libterminfo/term_private.h:1.7 src/lib/libterminfo/term_private.h:1.8 --- src/lib/libterminfo/term_private.h:1.7 Tue Mar 2 14:11:11 2010 +++ src/lib/libterminfo/term_private.h Wed Sep 22 06:10:51 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: term_private.h,v 1.7 2010/03/02 14:11:11 roy Exp $ */ +/* $NetBSD: term_private.h,v 1.8 2010/09/22 06:10:51 roy Exp $ */ /* * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. @@ -71,7 +71,7 @@ #define VALID_NUMERIC(s) ((s) = 0) #define VALID_STRING(s) ((s) != CANCELLED_STRING (s) != ABSENT_STRING) -typedef struct termextra { +typedef struct { const char *id; char type; char flag; @@ -79,7 +79,7 @@ const char *str; } TERMUSERDEF; -typedef struct terminal { +typedef struct { int fildes; /* We need to expose these so that the macros work */ const char *name; @@ -125,14 +125,14 @@ #define UINT16_T_MAX 0x -typedef struct tbuf { +typedef struct { char *buf; size_t buflen; size_t bufpos; size_t entries; } TBUF; -typedef struct tic { +typedef struct { char *name; char *alias; char *desc; Index: src/lib/libterminfo/termcap.c diff -u src/lib/libterminfo/termcap.c:1.8 src/lib/libterminfo/termcap.c:1.9 --- src/lib/libterminfo/termcap.c:1.8 Sun Jul 4 07:30:33 2010 +++ src/lib/libterminfo/termcap.c Wed Sep 22 06:10:51 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: termcap.c,v 1.8 2010/07/04 07:30:33 roy Exp $ */ +/* $NetBSD: termcap.c,v 1.9 2010/09/22 06:10:51 roy Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: termcap.c,v 1.8 2010/07/04 07:30:33 roy Exp $); +__RCSID($NetBSD: termcap.c,v 1.9 2010/09/22 06:10:51 roy Exp $); #include assert.h #include ctype.h @@ -326,10 +326,12 @@ return NULL; } -static struct def_info { +typedef struct { const char *name; const char *cap; -} def_infos[] = { +} DEF_INFO; + +static DEF_INFO def_infos[] = { { bel, ^G }, { cr, ^M }, { cud1, ^J }, Index: src/lib/libterminfo/termcap_map.c diff -u src/lib/libterminfo/termcap_map.c:1.2 src/lib/libterminfo/termcap_map.c:1.3 --- src/lib/libterminfo/termcap_map.c:1.2 Fri Feb 12 10:18:56 2010 +++ src/lib/libterminfo/termcap_map.c Wed Sep 22 06:10:51 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: termcap_map.c,v 1.2 2010/02/12 10:18:56 roy Exp $ */ +/* $NetBSD: termcap_map.c,v 1.3 2010/09/22 06:10:51 roy Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -28,9 +28,9 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: termcap_map.c,v 1.2 2010/02/12 10:18:56 roy Exp $); +__RCSID($NetBSD: termcap_map.c,v 1.3 2010/09/22 06:10:51 roy Exp $); -typedef struct termcap_entry { +typedef struct { const char id[3]; int ti; } TENTRY; Index: src/lib/libterminfo/tparm.c diff -u src/lib/libterminfo/tparm.c:1.1 src/lib/libterminfo/tparm.c:1.2 --- src/lib/libterminfo/tparm.c:1.1 Wed Feb 3 15:16:32 2010 +++ src/lib/libterminfo/tparm.c Wed Sep 22 06:10:51 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: tparm.c,v 1.1 2010/02/03 15:16:32 roy Exp $ */ +/* $NetBSD: tparm.c,v 1.2 2010/09/22 06:10:51 roy Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: tparm.c,v 1.1 2010/02/03 15:16:32 roy Exp $); +__RCSID($NetBSD: tparm.c,v 1.2 2010/09/22 06:10:51 roy Exp $); #include assert.h #include ctype.h @@ -42,13 +42,13 @@ static TERMINAL *dumbterm; /* For non thread safe functions */ -typedef struct tpstack { +typedef struct { long nums[20]; char *strings[20]; size_t
CVS commit: src/crypto/dist/ipsec-tools/src/racoon
Module Name:src Committed By: vanhu Date: Wed Sep 22 07:34:51 UTC 2010 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: nattraversal.h Log Message: fixed a typo in macros, reported by marisp (at) mt.lv To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/crypto/dist/ipsec-tools/src/racoon/nattraversal.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/dist/ipsec-tools/src/racoon/nattraversal.h diff -u src/crypto/dist/ipsec-tools/src/racoon/nattraversal.h:1.6 src/crypto/dist/ipsec-tools/src/racoon/nattraversal.h:1.7 --- src/crypto/dist/ipsec-tools/src/racoon/nattraversal.h:1.6 Sat Sep 9 16:22:09 2006 +++ src/crypto/dist/ipsec-tools/src/racoon/nattraversal.h Wed Sep 22 07:34:51 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: nattraversal.h,v 1.6 2006/09/09 16:22:09 manu Exp $ */ +/* $NetBSD: nattraversal.h,v 1.7 2010/09/22 07:34:51 vanhu Exp $ */ /* * Copyright (C) 2004 SuSE Linux AG, Nuernberg, Germany. @@ -42,12 +42,12 @@ #define NAT_KA_QUEUED (1L4) #define NAT_ADD_NON_ESP_MARKER (1L5) -#define NATT_AVAILABLE(ph1) ((iph1)-natt_flags NAT_ANNOUNCED) +#define NATT_AVAILABLE(_ph1) ((_ph1)-natt_flags NAT_ANNOUNCED) #define NAT_DETECTED (NAT_DETECTED_ME | NAT_DETECTED_PEER) #define NON_ESP_MARKER_LEN sizeof(u_int32_t) -#define NON_ESP_MARKER_USE(iph1) ((iph1)-natt_flags NAT_ADD_NON_ESP_MARKER) +#define NON_ESP_MARKER_USE(_ph1) ((_ph1)-natt_flags NAT_ADD_NON_ESP_MARKER) /* These are the values from parsing remote {} block of the config file. */
CVS commit: src/crypto/dist/ipsec-tools/src/racoon
Module Name:src Committed By: vanhu Date: Wed Sep 22 13:37:35 UTC 2010 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: admin.c Log Message: get the correct length of username when processing ADMIN_LOGOUT_USER, patch by rweikusat (at) mssgmbh.com To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/crypto/dist/ipsec-tools/src/racoon/admin.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/dist/ipsec-tools/src/racoon/admin.c diff -u src/crypto/dist/ipsec-tools/src/racoon/admin.c:1.32 src/crypto/dist/ipsec-tools/src/racoon/admin.c:1.33 --- src/crypto/dist/ipsec-tools/src/racoon/admin.c:1.32 Thu Sep 3 09:29:07 2009 +++ src/crypto/dist/ipsec-tools/src/racoon/admin.c Wed Sep 22 13:37:35 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: admin.c,v 1.32 2009/09/03 09:29:07 tteras Exp $ */ +/* $NetBSD: admin.c,v 1.33 2010/09/22 13:37:35 vanhu Exp $ */ /* Id: admin.c,v 1.25 2006/04/06 14:31:04 manubsd Exp */ @@ -329,7 +329,7 @@ case ADMIN_LOGOUT_USER: { struct ph1handle *iph1; char user[LOGINLEN+1]; - int found = 0, len = com-ac_len - sizeof(com); + int found = 0, len = com-ac_len - sizeof(*com); if (len LOGINLEN) { plog(LLV_ERROR, LOCATION, NULL,
CVS commit: src/external/bsd/ntp/dist/ntpd
Module Name:src Committed By: christos Date: Wed Sep 22 14:37:08 UTC 2010 Modified Files: src/external/bsd/ntp/dist/ntpd: ntpd.c Log Message: fix typo. From Anon Ymous To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ntp/dist/ntpd/ntpd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/ntp/dist/ntpd/ntpd.c diff -u src/external/bsd/ntp/dist/ntpd/ntpd.c:1.2 src/external/bsd/ntp/dist/ntpd/ntpd.c:1.3 --- src/external/bsd/ntp/dist/ntpd/ntpd.c:1.2 Sun Dec 13 19:42:47 2009 +++ src/external/bsd/ntp/dist/ntpd/ntpd.c Wed Sep 22 10:37:08 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ntpd.c,v 1.2 2009/12/14 00:42:47 christos Exp $ */ +/* $NetBSD: ntpd.c,v 1.3 2010/09/22 14:37:08 christos Exp $ */ /* * ntpd.c - main program for the fixed point NTP daemon @@ -1179,7 +1179,7 @@ #ifdef HAVE_DNSREGISTRATION if (mdnsreg (current_time - mdnsreg ) 60 mdnstries sys_leap != LEAP_NOTINSYNC) { mdnsreg = current_time; - msyslog(LOG_INFO, Attemping to register mDNS); + msyslog(LOG_INFO, Attempting to register mDNS); if ( DNSServiceRegister (mdns, 0, 0, NULL, _ntp._udp, NULL, NULL, htons(NTP_PORT), 0, NULL, NULL, NULL) != kDNSServiceErr_NoError ) { if (!--mdnstries) {
CVS commit: src/sys/arch/amd64/amd64
Module Name:src Committed By: jakllsch Date: Wed Sep 22 16:16:52 UTC 2010 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Avoid fault if acpi_softc is NULL at attempted power-off. XXX at least some of this should be factored off into arch/x86. To generate a diff of this commit: cvs rdiff -u -r1.148 -r1.149 src/sys/arch/amd64/amd64/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/machdep.c diff -u src/sys/arch/amd64/amd64/machdep.c:1.148 src/sys/arch/amd64/amd64/machdep.c:1.149 --- src/sys/arch/amd64/amd64/machdep.c:1.148 Sat Aug 7 20:07:25 2010 +++ src/sys/arch/amd64/amd64/machdep.c Wed Sep 22 16:16:51 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.148 2010/08/07 20:07:25 jruoho Exp $ */ +/* $NetBSD: machdep.c,v 1.149 2010/09/22 16:16:51 jakllsch Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008 @@ -107,7 +107,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.148 2010/08/07 20:07:25 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.149 2010/09/22 16:16:51 jakllsch Exp $); /* #define XENDEBUG_LOW */ @@ -697,8 +697,10 @@ if ((howto RB_POWERDOWN) == RB_POWERDOWN) { #ifndef XEN #if NACPICA 0 - acpi_enter_sleep_state(acpi_softc, ACPI_STATE_S5); - printf(WARNING: powerdown failed!\n); + if (acpi_softc != NULL) { + acpi_enter_sleep_state(acpi_softc, ACPI_STATE_S5); + printf(WARNING: ACPI powerdown failed!\n); + } #endif #else /* XEN */ HYPERVISOR_shutdown();
CVS commit: src/lib/libc/sys
Module Name:src Committed By: wiz Date: Wed Sep 22 17:58:09 UTC 2010 Modified Files: src/lib/libc/sys: open.2 Log Message: Bump date for O_DIRECTORY, more markup, merge two error sections. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/lib/libc/sys/open.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/open.2 diff -u src/lib/libc/sys/open.2:1.46 src/lib/libc/sys/open.2:1.47 --- src/lib/libc/sys/open.2:1.46 Tue Sep 21 19:26:18 2010 +++ src/lib/libc/sys/open.2 Wed Sep 22 17:58:09 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: open.2,v 1.46 2010/09/21 19:26:18 chs Exp $ +.\ $NetBSD: open.2,v 1.47 2010/09/22 17:58:09 wiz Exp $ .\ .\ Copyright (c) 1980, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\ .\ @(#)open.2 8.2 (Berkeley) 11/16/93 .\ -.Dd September 6, 2010 +.Dd September 22, 2010 .Dt OPEN 2 .Os .Sh NAME @@ -308,9 +308,9 @@ and there are no free inodes on the file system on which the file is being created. .It Bq Er ENOTDIR -A component of the path prefix is not a directory. -.It Bq Er ENOTDIR -O_DIRECTORY is specified and the last path component is not a directory. +A component of the path prefix is not a directory; or +.Dv O_DIRECTORY +is specified and the last path component is not a directory. .It Bq Er ENXIO The named file is a character special or block special file, and the device associated with this special file
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Wed Sep 22 17:59:35 UTC 2010 Modified Files: src/share/man/man4: options.4 Log Message: Punctuation improvement, bump date for FAST_IPSEC description. To generate a diff of this commit: cvs rdiff -u -r1.396 -r1.397 src/share/man/man4/options.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/options.4 diff -u src/share/man/man4/options.4:1.396 src/share/man/man4/options.4:1.397 --- src/share/man/man4/options.4:1.396 Tue Sep 21 13:46:41 2010 +++ src/share/man/man4/options.4 Wed Sep 22 17:59:35 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: options.4,v 1.396 2010/09/21 13:46:41 degroote Exp $ +.\ $NetBSD: options.4,v 1.397 2010/09/22 17:59:35 wiz Exp $ .\ .\ Copyright (c) 1996 .\ Perry E. Metzger. All rights reserved. @@ -30,7 +30,7 @@ .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\ .\ -.Dd July 24, 2010 +.Dd September 21, 2010 .Dt OPTIONS 4 .Os .Sh NAME @@ -1670,16 +1670,16 @@ .Xr ipsec 4 for details. .It Cd options FAST_IPSEC -Includes support for the +Includes support for the .Tn IPsec -protocol, using the implementation derived from -.Ox -, relaying on +protocol, using the implementation derived from +.Ox , +relaying on .Xr opencrypto 9 to carry out cryptographic operations. See .Xr fast_ipsec 4 -for details. +for details. .It Cd options IPSEC_NAT_T Includes support for .Tn IPsec
CVS commit: [netbsd-5] src/dist/bzip2
Module Name:src Committed By: snj Date: Wed Sep 22 22:53:05 UTC 2010 Modified Files: src/dist/bzip2 [netbsd-5]: decompress.c Log Message: Pull up following revision(s) (requested by christos in ticket #1455): dist/bzip2/decompress.c: revision 1.2 avoid integer overflow that can lead to buffer overflow To generate a diff of this commit: cvs rdiff -u -r1.1.1.3 -r1.1.1.3.8.1 src/dist/bzip2/decompress.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/bzip2/decompress.c diff -u src/dist/bzip2/decompress.c:1.1.1.3 src/dist/bzip2/decompress.c:1.1.1.3.8.1 --- src/dist/bzip2/decompress.c:1.1.1.3 Tue Mar 18 14:41:45 2008 +++ src/dist/bzip2/decompress.c Wed Sep 22 22:53:05 2010 @@ -381,6 +381,13 @@ es = -1; N = 1; do { + /* Check that N doesn't get too big, so that es doesn't + go negative. The maximum value that can be + RUNA/RUNB encoded is equal to the block size (post + the initial RLE), viz, 900k, so bounding N at 2 + million should guard against overflow without + rejecting any legitimate inputs. */ + if (N = 2*1024*1024) RETURN(BZ_DATA_ERROR); if (nextSym == BZ_RUNA) es = es + (0+1) * N; else if (nextSym == BZ_RUNB) es = es + (1+1) * N; N = N * 2;
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: snj Date: Wed Sep 22 22:53:54 UTC 2010 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: 1455 To generate a diff of this commit: cvs rdiff -u -r1.1.2.244 -r1.1.2.245 src/doc/CHANGES-5.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.1 diff -u src/doc/CHANGES-5.1:1.1.2.244 src/doc/CHANGES-5.1:1.1.2.245 --- src/doc/CHANGES-5.1:1.1.2.244 Mon Sep 13 19:54:24 2010 +++ src/doc/CHANGES-5.1 Wed Sep 22 22:53:53 2010 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.244 2010/09/13 19:54:24 snj Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.245 2010/09/22 22:53:53 snj Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -17503,3 +17503,8 @@ Welcome to 5.1_RC4! [snj] +dist/bzip2/decompress.c1.2 + + Avoid integer overflow that can lead to buffer overflow. + [christos, ticket #1455] +
CVS commit: [netbsd-4] src/dist/bzip2
Module Name:src Committed By: snj Date: Wed Sep 22 23:08:01 UTC 2010 Modified Files: src/dist/bzip2 [netbsd-4]: decompress.c Log Message: Pull up following revision(s) (requested by christos in ticket #1406): dist/bzip2/decompress.c: revision 1.2 avoid integer overflow that can lead to buffer overflow To generate a diff of this commit: cvs rdiff -u -r1.1.1.2.18.1 -r1.1.1.2.18.2 src/dist/bzip2/decompress.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/bzip2/decompress.c diff -u src/dist/bzip2/decompress.c:1.1.1.2.18.1 src/dist/bzip2/decompress.c:1.1.1.2.18.2 --- src/dist/bzip2/decompress.c:1.1.1.2.18.1 Mon Mar 24 20:22:35 2008 +++ src/dist/bzip2/decompress.c Wed Sep 22 23:08:01 2010 @@ -381,6 +381,13 @@ es = -1; N = 1; do { + /* Check that N doesn't get too big, so that es doesn't + go negative. The maximum value that can be + RUNA/RUNB encoded is equal to the block size (post + the initial RLE), viz, 900k, so bounding N at 2 + million should guard against overflow without + rejecting any legitimate inputs. */ + if (N = 2*1024*1024) RETURN(BZ_DATA_ERROR); if (nextSym == BZ_RUNA) es = es + (0+1) * N; else if (nextSym == BZ_RUNB) es = es + (1+1) * N; N = N * 2;
CVS commit: [netbsd-4] src/doc
Module Name:src Committed By: snj Date: Wed Sep 22 23:08:31 UTC 2010 Modified Files: src/doc [netbsd-4]: CHANGES-4.1 Log Message: 1406 To generate a diff of this commit: cvs rdiff -u -r1.1.2.207 -r1.1.2.208 src/doc/CHANGES-4.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-4.1 diff -u src/doc/CHANGES-4.1:1.1.2.207 src/doc/CHANGES-4.1:1.1.2.208 --- src/doc/CHANGES-4.1:1.1.2.207 Sun Sep 12 21:19:33 2010 +++ src/doc/CHANGES-4.1 Wed Sep 22 23:08:31 2010 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-4.1,v 1.1.2.207 2010/09/12 21:19:33 bouyer Exp $ +# $NetBSD: CHANGES-4.1,v 1.1.2.208 2010/09/22 23:08:31 snj Exp $ A complete list of changes from the NetBSD 4.0 release to the NetBSD 4.1 release: @@ -4240,3 +4240,8 @@ also avoids dropped errors when the length exceeds the link mtu. [mlelstv, ticket #1405] +dist/bzip2/decompress.c1.2 + + Avoid integer overflow that can lead to buffer overflow. + [christos, ticket #1406] +