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

Bug#182542: libc6-dev: strerror_r totally messed up



At Wed, 26 Feb 2003 13:43:06 +0100,
Piotr Sulecki wrote:
> The manual, the declaration and the working of strerror_t() function
> disagree. The manual page strerror(3) states that the function is declared
> in <string.h> as
> 
> int strerror_r(int errnum, char *buf, size_t n);
> 
> The include file <string.h> contains (abbreviated):
> 
> char *strerror_r (int __errnum, char *__buf, size_t __buflen);
> 
> (note the return type). And the function never touches the given buffer,
> instead it works exactly like strerror(). This means that it's not
> thread-safe, and can potentially be used for buffer-overrun attacks.
> 
> The manual-described working of the function is the correct one, I think.
> At the very least, it's almost identical to HP/UX strerror_t() manual.

It's not glibc fault, info in glibc has a correct description.

	- Function: char * strerror_r (int ERRNUM, char *BUF, size_t N)

I reassign this bug to manpages-dev.

Regards,
-- gotom



Reply to: