From owner-p4-projects Fri Aug 23 23:44:34 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AE7A537B401; Fri, 23 Aug 2002 23:43:39 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3830637B400 for ; Fri, 23 Aug 2002 23:43:39 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 943CA43E75 for ; Fri, 23 Aug 2002 23:43:38 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7O6hcJU043460 for ; Fri, 23 Aug 2002 23:43:38 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7O6hcYE043457 for perforce@freebsd.org; Fri, 23 Aug 2002 23:43:38 -0700 (PDT) Date: Fri, 23 Aug 2002 23:43:38 -0700 (PDT) Message-Id: <200208240643.g7O6hcYE043457@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm Subject: PERFORCE change 16495 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=16495 Change 16495 by peter@peter_daintree on 2002/08/23 23:43:12 IFC @16494 Affected files ... .. //depot/projects/ia64/lib/libc/gen/utime.3#2 integrate .. //depot/projects/ia64/lib/libc/sys/madvise.2#2 integrate .. //depot/projects/ia64/lib/libc/sys/mincore.2#4 integrate .. //depot/projects/ia64/lib/libc/sys/mlock.2#2 integrate .. //depot/projects/ia64/lib/libc/sys/mmap.2#5 integrate .. //depot/projects/ia64/lib/libc/sys/mprotect.2#2 integrate .. //depot/projects/ia64/lib/libc/sys/msync.2#2 integrate .. //depot/projects/ia64/lib/libc/sys/munmap.2#3 integrate .. //depot/projects/ia64/release/picobsd/bridge/crunch.conf#5 integrate .. //depot/projects/ia64/release/picobsd/dial/config#3 integrate .. //depot/projects/ia64/release/picobsd/dial/crunch.conf#3 integrate .. //depot/projects/ia64/secure/lib/libcipher/crypt.c#3 integrate .. //depot/projects/ia64/sys/cam/cam_periph.c#3 integrate .. //depot/projects/ia64/sys/kern/link_elf.c#8 integrate .. //depot/projects/ia64/sys/netinet6/esp_input.c#6 integrate Differences ... ==== //depot/projects/ia64/lib/libc/gen/utime.3#2 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)utime.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/gen/utime.3,v 1.10 2001/10/01 16:08:51 ru Exp $ +.\" $FreeBSD: src/lib/libc/gen/utime.3,v 1.11 2002/08/24 00:39:43 mike Exp $ .\" .Dd June 4, 1993 .Dt UTIME 3 @@ -41,7 +41,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h .In utime.h .Ft int .Fn utime "const char *file" "const struct utimbuf *timep" ==== //depot/projects/ia64/lib/libc/sys/madvise.2#2 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)madvise.2 8.1 (Berkeley) 6/9/93 -.\" $FreeBSD: src/lib/libc/sys/madvise.2,v 1.23 2001/10/01 16:09:02 ru Exp $ +.\" $FreeBSD: src/lib/libc/sys/madvise.2,v 1.24 2002/08/24 00:39:43 mike Exp $ .\" .Dd July 19, 1996 .Dt MADVISE 2 @@ -41,7 +41,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h .In sys/mman.h .Ft int .Fn madvise "void *addr" "size_t len" "int behav" ==== //depot/projects/ia64/lib/libc/sys/mincore.2#4 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)mincore.2 8.1 (Berkeley) 6/9/93 -.\" $FreeBSD: src/lib/libc/sys/mincore.2,v 1.19 2002/03/09 07:05:22 dd Exp $ +.\" $FreeBSD: src/lib/libc/sys/mincore.2,v 1.20 2002/08/24 00:39:43 mike Exp $ .\" .Dd June 9, 1993 .Dt MINCORE 2 @@ -41,7 +41,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h .In sys/mman.h .Ft int .Fn mincore "const void *addr" "size_t len" "char *vec" ==== //depot/projects/ia64/lib/libc/sys/mlock.2#2 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)mlock.2 8.2 (Berkeley) 12/11/93 -.\" $FreeBSD: src/lib/libc/sys/mlock.2,v 1.11 2001/10/01 16:09:02 ru Exp $ +.\" $FreeBSD: src/lib/libc/sys/mlock.2,v 1.12 2002/08/24 00:39:43 mike Exp $ .\" .Dd June 2, 1993 .Dt MLOCK 2 @@ -42,7 +42,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h .In sys/mman.h .Ft int .Fn mlock "const void *addr" "size_t len" ==== //depot/projects/ia64/lib/libc/sys/mmap.2#5 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 -.\" $FreeBSD: src/lib/libc/sys/mmap.2,v 1.43 2002/03/15 18:04:00 ru Exp $ +.\" $FreeBSD: src/lib/libc/sys/mmap.2,v 1.44 2002/08/24 00:39:43 mike Exp $ .\" .Dd November 17, 2001 .Dt MMAP 2 @@ -41,7 +41,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h .In sys/mman.h .Ft void * .Fn mmap "void *addr" "size_t len" "int prot" "int flags" "int fd" "off_t offset" ==== //depot/projects/ia64/lib/libc/sys/mprotect.2#2 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)mprotect.2 8.1 (Berkeley) 6/9/93 -.\" $FreeBSD: src/lib/libc/sys/mprotect.2,v 1.13 2001/10/01 16:09:02 ru Exp $ +.\" $FreeBSD: src/lib/libc/sys/mprotect.2,v 1.14 2002/08/24 00:39:43 mike Exp $ .\" .Dd June 9, 1993 .Dt MPROTECT 2 @@ -41,7 +41,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h .In sys/mman.h .Ft int .Fn mprotect "const void *addr" "size_t len" "int prot" ==== //depot/projects/ia64/lib/libc/sys/msync.2#2 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)msync.2 8.2 (Berkeley) 6/21/94 -.\" $FreeBSD: src/lib/libc/sys/msync.2,v 1.21 2001/10/01 16:09:02 ru Exp $ +.\" $FreeBSD: src/lib/libc/sys/msync.2,v 1.22 2002/08/24 00:39:43 mike Exp $ .\" .Dd June 21, 1994 .Dt MSYNC 2 @@ -41,7 +41,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h .In sys/mman.h .Ft int .Fn msync "void *addr" "size_t len" "int flags" ==== //depot/projects/ia64/lib/libc/sys/munmap.2#3 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)munmap.2 8.3 (Berkeley) 5/27/94 -.\" $FreeBSD: src/lib/libc/sys/munmap.2,v 1.15 2002/01/07 06:12:25 dd Exp $ +.\" $FreeBSD: src/lib/libc/sys/munmap.2,v 1.16 2002/08/24 00:39:43 mike Exp $ .\" .Dd May 27, 1994 .Dt MUNMAP 2 @@ -41,7 +41,6 @@ .Sh LIBRARY .Lb libc .Sh SYNOPSIS -.In sys/types.h .In sys/mman.h .Ft int .Fn munmap "void *addr" "size_t len" ==== //depot/projects/ia64/release/picobsd/bridge/crunch.conf#5 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/release/picobsd/bridge/crunch.conf,v 1.11 2002/04/19 12:39:08 ru Exp $ +# $FreeBSD: src/release/picobsd/bridge/crunch.conf,v 1.12 2002/08/24 03:33:31 luigi Exp $ # # configuration file for "bridge" floppy. # Depending on your needs, almost surely you will need to @@ -21,11 +21,18 @@ buildopts -DNOPAM -DRELEASE_CRUNCH -DNONETGRAPH -DNOIPSEC -DNOINET6 # directories where to look for sources of various binaries. +# @__CWD__@ is a magic keyword in the picobsd's (Makefile.conf) +# which is replaced with the picobsd directory. +srcdirs @__CWD__@/src + # Some programs are especially written for PicoBSD and reside here # Make this first in the list so we can override standard programs # with the picobsd-specific ones. srcdirs /usr/src/release/picobsd/tinyware -# Other places to look. + +# +# standard locations +# srcdirs /usr/src/bin srcdirs /usr/src/sbin/i386 srcdirs /usr/src/sbin @@ -85,7 +92,6 @@ progs w # 0KB. progs msg # 0KB. ln msg dmesg -progs kget # 0KB. progs reboot # 0KB. #progs less # 36KB #ln less more @@ -160,6 +166,7 @@ # Check the ssh license! If you want to use this, # go to /usr/ports/security/ssh-picobsd, do a make extract configure +# You also need to install /usr/ports/math/libgmp-freebsd progs sshd # includes ssh and scp special sshd objvar SSHD_OBJS special sshd srcdir /usr/ports/picobsd/ssh-picobsd/work/ssh-1.2.27 @@ -169,6 +176,7 @@ ln sshd scp ### ee uses ncurses instead of curses -libs -ledit -lutil -lmd -lcrypt -lmp -lgmp -lm -lkvm +libs -ledit -lutil -lmd -lcrypt -lmp -lm -lkvm +libs /usr/local/lib/libgmp.a libs -lmytinfo -lipx -lz -lpcap -lwrap libs -ltermcap -lgnuregex # -lcurses ==== //depot/projects/ia64/release/picobsd/dial/config#3 (text+ko) ==== @@ -1,2 +1,5 @@ +# $FreeBSD: src/release/picobsd/dial/config,v 1.5 2002/08/24 03:54:38 luigi Exp $ STAND_LINKS="bin sbin usr/bin usr/sbin usr/libexec" o_no_devfs="" # we have devfs +#fd_size=2880 +#import_files="/usr/libexec/ld-elf.so.1 /usr/lib/libc.so.4 /usr/lib/libm.so.2" ==== //depot/projects/ia64/release/picobsd/dial/crunch.conf#3 (text+ko) ==== @@ -1,12 +1,27 @@ -# $FreeBSD: src/release/picobsd/dial/crunch.conf,v 1.4 2002/04/19 12:39:09 ru Exp $ +# $FreeBSD: src/release/picobsd/dial/crunch.conf,v 1.5 2002/08/24 03:54:38 luigi Exp $ # -# NOTE1: the string "/usr/src" will be automatically replaced with the -# correct value set in 'build' script - you should change it there +# NOTE: This configuration is not very up to date. You may want +# to check the "bridge" configuration instead. # Default build options buildopts -DNOPAM -DRELEASE_CRUNCH -DNOSECURE -DNOCRYPT -DNONETGRAPH -DNOIPSEC -# other sources +# The string "/usr/src" will be automatically replaced with the +# correct value set in 'build' script. + +# directories where to look for sources of various binaries. +# @__CWD__@ is a magic keyword in the picobsd's (Makefile.conf) +# which is replaced with the picobsd directory. +srcdirs @__CWD__@/src + +# Some programs are especially written for PicoBSD and reside here +# Make this first in the list so we can override standard programs +# with the picobsd-specific ones. +srcdirs /usr/src/release/picobsd/tinyware + +# +# standard locations +# srcdirs /usr/src/bin srcdirs /usr/src/sbin/i386 srcdirs /usr/src/sbin @@ -15,17 +30,20 @@ srcdirs /usr/src/usr.sbin srcdirs /usr/src/libexec -# ns, vm etc... -srcdirs /usr/src/release/picobsd/tinyware - -progs ppp ftp telnet ee gzip less -#progs ssh +progs ppp +progs ee +progs gzip +#progs ftp # 38KB +progs telnet +#ln minigzip gzip ln gzip gunzip ln gzip zcat ln gzip gzcat -ln less more +#progs less # 36KB +#ln less more +#progs ssh -progs sh test kget echo pwd msg stty +progs sh test echo pwd msg stty progs hostname cat kill sps vm ns progs chmod chown help getty progs cp df fsck ping mv ln traceroute @@ -43,6 +61,8 @@ ln mount_ext2fs ext2fs ln chown chgrp -libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lgnuregex -lmp -lgmp -lm +libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lgnuregex -lmp -lm +# you need to install libgmp-freebsd from ports/math +libs /usr/local/lib/libgmp.a libs -lncurses -lmytinfo -lipx -lz libs -ltermcap -lalias ==== //depot/projects/ia64/secure/lib/libcipher/crypt.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/secure/lib/libcipher/crypt.c,v 1.8 2002/02/18 20:35:20 mike Exp $ + * $FreeBSD: src/secure/lib/libcipher/crypt.c,v 1.9 2002/08/24 02:53:23 nectar Exp $ * * This is an original implementation of the DES and the crypt(3) interfaces * by David Burren . @@ -45,10 +45,8 @@ * posted to the sci.crypt newsgroup by the author and is available for FTP. * * ARCHITECTURE ASSUMPTIONS: - * This code assumes that u_longs are 32 bits. It will probably not - * operate on 64-bit machines without modifications. * It is assumed that the 8-byte arrays passed by reference can be - * addressed as arrays of u_longs (ie. the CPU is not picky about + * addressed as arrays of uint32_t (ie. the CPU is not picky about * alignment). */ #include @@ -151,7 +149,7 @@ 2, 8, 24, 14, 32, 27, 3, 9, 19, 13, 30, 6, 22, 11, 4, 25 }; -static u_long bits32[32] = +static uint32_t bits32[32] = { 0x80000000, 0x40000000, 0x20000000, 0x10000000, 0x08000000, 0x04000000, 0x02000000, 0x01000000, @@ -165,20 +163,20 @@ static u_char bits8[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 }; -static u_long saltbits; +static uint32_t saltbits; static long old_salt; -static u_long *bits28, *bits24; +static uint32_t *bits28, *bits24; static u_char init_perm[64], final_perm[64]; -static u_long en_keysl[16], en_keysr[16]; -static u_long de_keysl[16], de_keysr[16]; +static uint32_t en_keysl[16], en_keysr[16]; +static uint32_t de_keysl[16], de_keysr[16]; static int des_initialised = 0; static u_char m_sbox[4][4096]; -static u_long psbox[4][256]; -static u_long ip_maskl[8][256], ip_maskr[8][256]; -static u_long fp_maskl[8][256], fp_maskr[8][256]; -static u_long key_perm_maskl[8][128], key_perm_maskr[8][128]; -static u_long comp_maskl[8][128], comp_maskr[8][128]; -static u_long old_rawkey0, old_rawkey1; +static uint32_t psbox[4][256]; +static uint32_t ip_maskl[8][256], ip_maskr[8][256]; +static uint32_t fp_maskl[8][256], fp_maskr[8][256]; +static uint32_t key_perm_maskl[8][128], key_perm_maskr[8][128]; +static uint32_t comp_maskl[8][128], comp_maskr[8][128]; +static uint32_t old_rawkey0, old_rawkey1; static u_char ascii64[] = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; @@ -208,7 +206,7 @@ des_init() { int i, j, b, k, inbit, obit; - u_long *p, *il, *ir, *fl, *fr; + uint32_t *p, *il, *ir, *fl, *fr; old_rawkey0 = old_rawkey1 = 0L; saltbits = 0L; @@ -338,7 +336,7 @@ static void setup_salt(long salt) { - u_long obit, saltbit; + uint32_t obit, saltbit; int i; if (salt == old_salt) @@ -360,14 +358,14 @@ int des_setkey(const char *key) { - u_long k0, k1, rawkey0, rawkey1; + uint32_t k0, k1, rawkey0, rawkey1; int shifts, i, b, round; if (!des_initialised) des_init(); - rawkey0 = ntohl(*(u_long *) key); - rawkey1 = ntohl(*(u_long *) (key + 4)); + rawkey0 = ntohl(*(uint32_t *) key); + rawkey1 = ntohl(*(uint32_t *) (key + 4)); if ((rawkey0 | rawkey1) && rawkey0 == old_rawkey0 @@ -407,7 +405,7 @@ */ shifts = 0; for (round = 0; round < 16; round++) { - u_long t0, t1; + uint32_t t0, t1; int bit; shifts += key_shifts[round]; @@ -440,13 +438,14 @@ static int -do_des( u_long l_in, u_long r_in, u_long *l_out, u_long *r_out, int count) +do_des( uint32_t l_in, uint32_t r_in, uint32_t *l_out, uint32_t *r_out, + int count) { /* * l_in, r_in, l_out, and r_out are in pseudo-"big-endian" format. */ - u_long mask, rawl, rawr, l, r, *kl, *kr, *kl1, *kr1; - u_long f, r48l, r48r; + uint32_t mask, rawl, rawr, l, r, *kl, *kr, *kl1, *kr1; + uint32_t f, r48l, r48r; int i, j, b, round; if (count == 0) { @@ -559,7 +558,7 @@ int des_cipher(const char *in, char *out, long salt, int count) { - u_long l_out, r_out, rawl, rawr; + uint32_t l_out, r_out, rawl, rawr; int retval; if (!des_initialised) @@ -567,13 +566,13 @@ setup_salt(salt); - rawl = ntohl(*((u_long *) in)++); - rawr = ntohl(*((u_long *) in)); + rawl = ntohl(*((uint32_t *) in)++); + rawr = ntohl(*((uint32_t *) in)); retval = do_des(rawl, rawr, &l_out, &r_out, count); - *((u_long *) out)++ = htonl(l_out); - *((u_long *) out) = htonl(r_out); + *((uint32_t *) out)++ = htonl(l_out); + *((uint32_t *) out) = htonl(r_out); return(retval); } @@ -582,7 +581,7 @@ setkey(char *key) { int i, j; - u_long packed_keys[2]; + uint32_t packed_keys[2]; u_char *p; p = (u_char *) packed_keys; @@ -600,7 +599,7 @@ int encrypt(char *block, int flag) { - u_long io[2]; + uint32_t io[2]; u_char *p; int i, j, retval; ==== //depot/projects/ia64/sys/cam/cam_periph.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/cam/cam_periph.c,v 1.39 2002/06/07 23:51:30 mjacob Exp $ + * $FreeBSD: src/sys/cam/cam_periph.c,v 1.41 2002/08/24 02:51:28 peter Exp $ */ #include @@ -363,34 +363,33 @@ target_id_t target, lun_id_t lun) { u_int unit; - int hit, i, val, dunit; + int wired, i, val, dunit; const char *dname, *strval; char pathbuf[32], *periph_name; - unit = 0; - hit = 0; - periph_name = p_drv->driver_name; snprintf(pathbuf, sizeof(pathbuf), "scbus%d", pathid); + unit = 0; i = 0; dname = periph_name; - while ((resource_find_dev(&i, dname, &dunit, NULL, NULL)) == 0) { + for (wired = 0; resource_find_dev(&i, dname, &dunit, NULL, NULL) == 0; + wired = 0) { if (resource_string_value(dname, dunit, "at", &strval) == 0) { if (strcmp(strval, pathbuf) != 0) continue; - hit++; + wired++; } if (resource_int_value(dname, dunit, "target", &val) == 0) { if (val != target) continue; - hit++; + wired++; } if (resource_int_value(dname, dunit, "lun", &val) == 0) { if (val != lun) continue; - hit++; + wired++; } - if (hit != 0) { + if (wired != 0) { unit = dunit; break; } @@ -402,8 +401,7 @@ * if we have wildcard matches, we don't return the same * unit number twice. */ - unit = camperiphnextunit(p_drv, unit, /*wired*/hit, pathid, - target, lun); + unit = camperiphnextunit(p_drv, unit, wired, pathid, target, lun); return (unit); } @@ -1554,25 +1552,25 @@ case CAM_CMD_TIMEOUT: if (bootverbose && printed == 0) { xpt_print_path(ccb->ccb_h.path); - printf("Command timed out"); + printf("Command timed out\n"); printed++; } case CAM_UNEXP_BUSFREE: if (bootverbose && printed == 0) { xpt_print_path(ccb->ccb_h.path); - printf("Unexpected Bus Free"); + printf("Unexpected Bus Free\n"); printed++; } case CAM_UNCOR_PARITY: if (bootverbose && printed == 0) { xpt_print_path(ccb->ccb_h.path); - printf("Uncorrected Parity Error"); + printf("Uncorrected Parity Error\n"); printed++; } case CAM_DATA_RUN_ERR: if (bootverbose && printed == 0) { xpt_print_path(ccb->ccb_h.path); - printf("Data Overrun"); + printf("Data Overrun\n"); printed++; } error = EIO; /* we have to kill the command */ @@ -1602,7 +1600,7 @@ error = ERESTART; if (bootverbose && printed == 0) { xpt_print_path(ccb->ccb_h.path); - printf("Selection Timeout"); + printf("Selection Timeout\n"); printed++; } ==== //depot/projects/ia64/sys/kern/link_elf.c#8 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/kern/link_elf.c,v 1.57 2002/08/22 22:01:53 peter Exp $ + * $FreeBSD: src/sys/kern/link_elf.c,v 1.58 2002/08/24 05:01:33 marcel Exp $ */ #include "opt_ddb.h" @@ -1051,7 +1051,7 @@ elf_file_t ef = (elf_file_t) lf; const Elf_Sym* es = (const Elf_Sym*) sym; - if (es >= ef->symtab && ((es - ef->symtab) < ef->nchains)) { + if (es >= ef->symtab && es < (ef->symtab + ef->nchains)) { symval->name = ef->strtab + es->st_name; symval->value = (caddr_t) ef->address + es->st_value; symval->size = es->st_size; @@ -1059,7 +1059,7 @@ } if (ef->symtab == ef->ddbsymtab) return ENOENT; - if (es >= ef->ddbsymtab && ((es - ef->ddbsymtab) < ef->ddbsymcnt)) { + if (es >= ef->ddbsymtab && es < (ef->ddbsymtab + ef->ddbsymcnt)) { symval->name = ef->ddbstrtab + es->st_name; symval->value = (caddr_t) ef->address + es->st_value; symval->size = es->st_size; ==== //depot/projects/ia64/sys/netinet6/esp_input.c#6 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/netinet6/esp_input.c,v 1.13 2002/07/18 04:18:56 ume Exp $ */ +/* $FreeBSD: src/sys/netinet6/esp_input.c,v 1.14 2002/08/24 04:48:13 ume Exp $ */ /* $KAME: esp_input.c,v 1.62 2002/01/07 11:39:57 kjc Exp $ */ /* @@ -217,6 +217,10 @@ if (!sumalgo) goto noreplaycheck; siz = (((*sumalgo->sumsiz)(sav) + 3) & ~(4 - 1)); + if (m->m_pkthdr.len < off + ESPMAXLEN + siz) { + ipsecstat.in_inval++; + goto bad; + } if (AH_MAXSUMSIZE < siz) { ipseclog((LOG_DEBUG, "internal error: AH_MAXSUMSIZE must be larger than %lu\n", @@ -572,6 +576,10 @@ if (!sumalgo) goto noreplaycheck; siz = (((*sumalgo->sumsiz)(sav) + 3) & ~(4 - 1)); + if (m->m_pkthdr.len < off + ESPMAXLEN + siz) { + ipsecstat.in_inval++; + goto bad; + } if (AH_MAXSUMSIZE < siz) { ipseclog((LOG_DEBUG, "internal error: AH_MAXSUMSIZE must be larger than %lu\n", To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message