Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Weirdness in comm(1)



At Sun, 29 Nov 2009 09:12:46 +0000, Roy Marples <roy%NetBSD.org@localhost> 
wrote:
Subject: Re: Weirdness in comm(1)
> 
> When I first looked at fgetstr.c and it's realloction, my first reaction 
> was that it would crash or have undefined behaviour when newsize > 
> INT_MAX. Closer inspection shows that it just reallocs the buffer on 
> each call when newsize > INT_MAX. In other words, it works, just very 
> inefficiently.

Yes, inefficient indeed.

> Attached is a patch that should restore this behaviour. Untested though.
> Does this appease you to any extent?

Yes, I think that's better than introducing a new errno, assuming it
tests OK (I haven't tried it yet either)

-- 
                                                Greg A. Woods
                                                Planix, Inc.

<woods%planix.com@localhost>       +1 416 218 0099        http://www.planix.com/

Attachment: pgpNIarTdqFgS.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index