Re: [PATCH] Add a local implementation of hstrerror for the system which do not have it
- From
Johannes Sixt <j.sixt@eudaptics.com>
- Date
- Jun 13, 2007, 07:05 UTC
- 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