Re: [PATCH] 1 of 2 s3_lib.c KNF retry

2014-05-04 Thread Chris Hettrick
>From owner-tech+m36...@openbsd.org Sat May 3 17:29:56 2014 >Delivered-To: ch...@structfoo.com >DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; >d=gmail.com; s=20120113; >h=mime-version:in-reply-to:references:date:message-id:subject:from:to > :cc:content-type; >

Re: malloc in libssl/src/apps

2014-05-04 Thread patrick keshishian
On Sun, May 04, 2014 at 03:50:06PM -0400, Jean-Philippe Ouellet wrote: > On Sun, May 04, 2014 at 12:17:16PM -0600, Theo de Raadt wrote: > > We are going to completely ignore diffs which change multiple idioms > > at once. > > Okay. > > > That is how mistakes get made. > > Yep, more true than I r

Re: malloc in libssl/src/apps

2014-05-04 Thread Jean-Philippe Ouellet
On Mon, May 05, 2014 at 11:12:00AM +1000, Joel Sing wrote: > > - i = 0; > > if (arg->count == 0) { > > arg->count = 20; > > - arg->data = (char **)malloc(sizeof(char *) * arg->count); > > + arg->data = calloc(arg->count, sizeof(char *)); > > } > > - for (

Re: malloc in libssl/src/apps

2014-05-04 Thread Jean-Philippe Ouellet
On Sun, May 04, 2014 at 11:30:40PM +0200, Alexander Hall wrote: > NULL theoretically could be != 0 Umm... short of something like: #undef NULL #define NULL "I'm silly and want to break everything" or something, I don't see when that'd be the case. According to ISO/IEC 9899:1999 TC3 (n1256

Re: malloc in libssl/src/apps

2014-05-04 Thread Joel Sing
On Mon, 5 May 2014, Jean-Philippe Ouellet wrote: > On Sun, May 04, 2014 at 12:17:16PM -0600, Theo de Raadt wrote: > > We are going to completely ignore diffs which change multiple idioms > > at once. > > Okay. > > > That is how mistakes get made. > > Yep, more true than I realized. FWIW I already

Re: malloc in libssl/src/apps

2014-05-04 Thread Andres Perera
On Sun, May 4, 2014 at 5:00 PM, Alexander Hall wrote: > On 05/04/14 21:50, Jean-Philippe Ouellet wrote: >> >> On Sun, May 04, 2014 at 12:17:16PM -0600, Theo de Raadt wrote: >>> >>> We are going to completely ignore diffs which change multiple idioms >>> at once. >> >> >> Okay. >> >>> That is how m

Re: malloc in libssl/src/apps

2014-05-04 Thread Alexander Hall
On 05/04/14 21:50, Jean-Philippe Ouellet wrote: On Sun, May 04, 2014 at 12:17:16PM -0600, Theo de Raadt wrote: We are going to completely ignore diffs which change multiple idioms at once. Okay. That is how mistakes get made. Yep, more true than I realized. Here's a simpler one: Index:

Re: vfs references to strncpy and MFSNAMELEN

2014-05-04 Thread Héctor Luis Gimbatti
I did not get any reply except yours.- Indeed patching is very easy that's why I didn't bother to post one and let most advanced users to patch it.- Testing for regressions can be hard.- I've found, in 5.4 version, upto 1400 references to strncpy but most of them should cause no problem (nor o

Re: malloc in libssl/src/apps

2014-05-04 Thread Jean-Philippe Ouellet
On Sun, May 04, 2014 at 12:17:16PM -0600, Theo de Raadt wrote: > We are going to completely ignore diffs which change multiple idioms > at once. Okay. > That is how mistakes get made. Yep, more true than I realized. Here's a simpler one: Index: apps.c =

Re: malloc in libssl/src/apps

2014-05-04 Thread Theo de Raadt
We are going to completely ignore diffs which change multiple idioms at once. That is how mistakes get made. > On Sun, May 04, 2014 at 02:38:40AM -0400, Jean-Philippe Ouellet wrote: > > Hello, > > > > I've gone through lib/libssl/src/apps with the goal of making {m,c,re}alloc > > uses more idiom

Re: USB *hci(4) freelists

2014-05-04 Thread Mark Kettenis
> Date: Sun, 4 May 2014 17:32:35 +0200 > From: Martin Pieuchot > > In USB land there is a lot of freelists. Every HC driver has one > freelist per type of descriptor and the memory allocator used to > populate these lists, usb_allocmem(), is a wrapper around > bus_dma{mem,map}* that uses two mor

ums(4) memory leak

2014-05-04 Thread Martin Pieuchot
Plug a memory leak related to HID descriptor parsing, ok? Index: hidms.c === RCS file: /cvs/src/sys/dev/usb/hidms.c,v retrieving revision 1.5 diff -u -p -r1.5 hidms.c --- hidms.c 9 Aug 2013 22:10:17 - 1.5 +++ hidms.c

HID parser

2014-05-04 Thread Martin Pieuchot
In December 2012 a user reported on misc@ that the Noppoo Mini Choc 84 USB keyboard does not work on OpenBSD [0]. More recently, mcbride@ and yasuoka@ contacted me because they have a mouse that is not properly recognized. Both issues are related to our HID descriptor parser. The diff below is a

USB *hci(4) freelists

2014-05-04 Thread Martin Pieuchot
In USB land there is a lot of freelists. Every HC driver has one freelist per type of descriptor and the memory allocator used to populate these lists, usb_allocmem(), is a wrapper around bus_dma{mem,map}* that uses two more lists. I don't see the point of having per-softc lists, but maybe somebo

Re: malloc in libssl/src/apps

2014-05-04 Thread patrick keshishian
On Sun, May 04, 2014 at 02:38:40AM -0400, Jean-Philippe Ouellet wrote: > Hello, > > I've gone through lib/libssl/src/apps with the goal of making {m,c,re}alloc > uses more idiomatic, adding error checking in some places where missing, > and some minor style unification. > > Feedback appreciated,

ssh regression suite connect-privsep.sh issue

2014-05-04 Thread Loganaden Velvindron
Hi All, The 'Z' flag was removed 10 days ago by Ted. connect-privsep.sh complains that there is an unknown malloc option. Diff below: Index: connect-privsep.sh === RCS file: /cvs/src/regress/usr.bin/ssh/connect-privsep.sh,v retriev

sftp zap extra whitespace

2014-05-04 Thread Loganaden Velvindron
Hi All, An extra whitespace can be removed here: Index: sftp.c === RCS file: /cvs/src/usr.bin/ssh/sftp.c,v retrieving revision 1.162 diff -u -p -u -p -r1.162 sftp.c --- sftp.c 29 Apr 2014 20:36:51 - 1.162 +++ sftp.c

Re: malloc in libssl/src/apps

2014-05-04 Thread patrick keshishian
On Sun, May 04, 2014 at 01:26:18AM -0700, Philip Guenther wrote: > On Sunday, May 4, 2014, patrick keshishian wrote: > > > On Sun, May 04, 2014 at 12:29:59AM -0700, Philip Guenther wrote: > > > On Sun, May 4, 2014 at 12:21 AM, patrick keshishian > > > > > >wrote: > > > > > > > On Sun, May 04, 2

Re: malloc in libssl/src/apps

2014-05-04 Thread Philip Guenther
On Sunday, May 4, 2014, Marc Espie wrote: > See guenther(2) for a more serious answer). > Thank you, but I've always thought of myself as belonging in section 6... Philip Guenther

Re: malloc in libssl/src/apps

2014-05-04 Thread Philip Guenther
On Sunday, May 4, 2014, patrick keshishian wrote: > On Sun, May 04, 2014 at 12:29:59AM -0700, Philip Guenther wrote: > > On Sun, May 4, 2014 at 12:21 AM, patrick keshishian > > > >wrote: > > > > > On Sun, May 04, 2014 at 02:38:40AM -0400, Jean-Philippe Ouellet wrote: > > > > > ... > > > > > > -

Re: malloc in libssl/src/apps

2014-05-04 Thread Marc Espie
On Sun, May 04, 2014 at 12:21:04AM -0700, patrick keshishian wrote: > why not use calloc(2)? Because it doesn't exist ? (hint: the 2 in calloc(2) is the manual section. There is no calloc system call, therefore you can't be right. See guenther(2) for a more serious answer).

Re: malloc in libssl/src/apps

2014-05-04 Thread patrick keshishian
On Sun, May 04, 2014 at 12:29:59AM -0700, Philip Guenther wrote: > On Sun, May 4, 2014 at 12:21 AM, patrick keshishian > wrote: > > > On Sun, May 04, 2014 at 02:38:40AM -0400, Jean-Philippe Ouellet wrote: > > > ... > > > > - if ((irow = (char **)malloc(sizeof(char *) * > > > -

Re: malloc in libssl/src/apps

2014-05-04 Thread Philip Guenther
On Sun, May 4, 2014 at 12:21 AM, patrick keshishian wrote: > On Sun, May 04, 2014 at 02:38:40AM -0400, Jean-Philippe Ouellet wrote: > ... > > - if ((irow = (char **)malloc(sizeof(char *) * > > - (DB_NUMBER + 1))) == NULL) { > > + irow = reallocarray(NULL, D

Re: malloc in libssl/src/apps

2014-05-04 Thread patrick keshishian
On Sun, May 04, 2014 at 02:38:40AM -0400, Jean-Philippe Ouellet wrote: > Hello, > > I've gone through lib/libssl/src/apps with the goal of making {m,c,re}alloc > uses more idiomatic, adding error checking in some places where missing, > and some minor style unification. > > Feedback appreciated,