From: Johannes Sixt Date: Wed, 13 Jun 2007 07:05:03 GMT Subject: Re: [PATCH] Add a local implementation of hstrerror for the system which do not have it Message-ID: <466F971F.C74761E2@eudaptics.com> In-Reply-To: <20070612213129.GD2459@steel.home> Alex Riesen wrote: > + static char buffer[32]; > ... > + sprintf(buffer, "Name resolution error %d", err); I don't think it's a problem for any current implementation, but it would be better to err on the conservative side: The buffer should be at least 44 chars wide to account for 20 digit negative numbers (thats the maximum if int is 64 bits wide). -- Hannes