Re: [PATCH] ELF: ensure PT_INTERP strings are NULL-terminated

2013-08-28 Thread Kenneth R Westerback
On Wed, Aug 28, 2013 at 09:43:24PM +0200, Maxime Villard wrote: > On 08/28/13 20:57, Matthew Dempsky wrote: > > On Wed, Aug 28, 2013 at 5:54 AM, Maxime Villard wrote: > >> + /* Ensure interp is a valid, NUL-terminated string > >> */ > >> + for (n = 0; n

Re: [PATCH] ELF: ensure PT_INTERP strings are NULL-terminated

2013-08-28 Thread Kenneth R Westerback
On Wed, Aug 28, 2013 at 08:44:26PM +0200, Maxime Villard wrote: > On 08/28/13 16:30, Kenneth R Westerback wrote: > > On Wed, Aug 28, 2013 at 02:54:11PM +0200, Maxime Villard wrote: > >> Updated diff, with small tweaks from Andres Perera, > >> * int -> size_t, signedness issue, even if it can't be

Re: [PATCH] ELF: ensure PT_INTERP strings are NULL-terminated

2013-08-28 Thread Maxime Villard
On 08/28/13 20:57, Matthew Dempsky wrote: > On Wed, Aug 28, 2013 at 5:54 AM, Maxime Villard wrote: >> + /* Ensure interp is a valid, NUL-terminated string */ >> + for (n = 0; n < pp->p_filesz; n++) { >> + if (interp[n] == '\

Re: Don't iterate on the global list in arp_{request,input}

2013-08-28 Thread Alexander Bluhm
On Wed, Aug 28, 2013 at 03:28:18PM +0200, Martin Pieuchot wrote: > Like the previous diffs, when we already have the ifp and want one of > its addresses, iterate on the ifp list instead of the global one. > > Tested with carp here. I appreciate any comment and oks. I think the code is nicer and d

Re: [PATCH] ELF: ensure PT_INTERP strings are NULL-terminated

2013-08-28 Thread Matthew Dempsky
On Wed, Aug 28, 2013 at 5:54 AM, Maxime Villard wrote: > + /* Ensure interp is a valid, NUL-terminated string */ > + for (n = 0; n < pp->p_filesz; n++) { > + if (interp[n] == '\0') > + b

Re: [PATCH] ELF: ensure PT_INTERP strings are NULL-terminated

2013-08-28 Thread Maxime Villard
On 08/28/13 16:30, Kenneth R Westerback wrote: > On Wed, Aug 28, 2013 at 02:54:11PM +0200, Maxime Villard wrote: >> Updated diff, with small tweaks from Andres Perera, >> * int -> size_t, signedness issue, even if it can't be >INT_MAX >> * NULL -> NUL >> >> >> Index: exec_elf.c >> =

games/trek: fix for tournament mode

2013-08-28 Thread Christian Weisgerber
trek(6)'s tournament mode is intended to have deterministic "random" numbers based on a password. This was broken 15 years ago when rand() was changed to random(), but the initial srand() was forgotten. ok? Index: setup.c === RCS fi

arc4random for src/games

2013-08-28 Thread Christian Weisgerber
This replaces srandomdev()+random() with calls to arc4random*() in src/games. There isn't much practical benefit to this. Consider it a style fix. I have NOT touched the games that call srandom() with a particular seed for deterministic gameplay. Index: arithmetic/arithmetic.c =

Re: missing bit in audio.4 ?

2013-08-28 Thread Jason McIntyre
On Wed, Aug 28, 2013 at 09:27:59AM +0200, Remco wrote: > Index: audio.4 > === > RCS file: /home/cvs/src/share/man/man4/audio.4,v > retrieving revision 1.62 > diff -u -r1.62 audio.4 > --- audio.4 15 Jul 2010 03:43:11 - 1.62 >

Re: threaded prof signals

2013-08-28 Thread Ted Unangst
On Fri, Aug 16, 2013 at 02:12, Ted Unangst wrote: > As per http://research.swtch.com/macpprof > > We deliver all prof signals to the main thread, which is unlikely to > result in accurate profiling info. I think the diff below fixes things. floating this again. note that it's not the clock being

Re: [PATCH] ELF: ensure PT_INTERP strings are NULL-terminated

2013-08-28 Thread Kenneth R Westerback
On Wed, Aug 28, 2013 at 02:54:11PM +0200, Maxime Villard wrote: > Updated diff, with small tweaks from Andres Perera, > * int -> size_t, signedness issue, even if it can't be >INT_MAX > * NULL -> NUL > > > Index: exec_elf.c > === >

Don't iterate on the global list in arp_{request,input}

2013-08-28 Thread Martin Pieuchot
Like the previous diffs, when we already have the ifp and want one of its addresses, iterate on the ifp list instead of the global one. Tested with carp here. I appreciate any comment and oks. Index: netinet/if_ether.c === RCS file:

Re: [PATCH] ELF: ensure PT_INTERP strings are NULL-terminated

2013-08-28 Thread Maxime Villard
Updated diff, with small tweaks from Andres Perera, * int -> size_t, signedness issue, even if it can't be >INT_MAX * NULL -> NUL Index: exec_elf.c === RCS file: /cvs/src/sys/kern/exec_elf.c,v retrieving revision 1.93 diff -u -p -r

Re: OpenBSD on a Nokia IP380

2013-08-28 Thread Alexey E. Suslikov
charter.net> writes: > installed. Guess I'll have to live with the 4 onboard NICs for the time > being. If you have no plans to forward full-blown 100Mbps between fxps and there's a dot1q-aware switch near you, using vlans may be a workaround for a limited number of physical ports.

missing bit in audio.4 ?

2013-08-28 Thread Remco
Index: audio.4 === RCS file: /home/cvs/src/share/man/man4/audio.4,v retrieving revision 1.62 diff -u -r1.62 audio.4 --- audio.4 15 Jul 2010 03:43:11 - 1.62 +++ audio.4 28 Aug 2013 07:22:57 - @@ -154,7 +154,7 @@ .V

[PATCH] ELF: ensure PT_INTERP strings are NULL-terminated

2013-08-28 Thread Maxime Villard
Hi, in the ELF format, the PT_INTERP segment contains the path of the interpreter which must be loaded. For this segment, the kernel looks at these values in the program header: p_offset: offset of the path string p_filesz: size of the path string, including the \0 The path string must be a val