This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/53444] New: Accommodate non-compliant strerror_r() on VxWorks.
- From: "rbmj at verizon dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 22 May 2012 00:59:45 +0000
- Subject: [Bug libfortran/53444] New: Accommodate non-compliant strerror_r() on VxWorks.
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53444
Bug #: 53444
Summary: Accommodate non-compliant strerror_r() on VxWorks.
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libfortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rbmj@verizon.net
Created attachment 27469
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27469
Fix - just use two arguments without buflen
On VxWorks, strerror_r() does not take a third argument.
This patch just uses the two arguments and *hopes* that we have enough space
allocated. There does not appear to be a way to avoid the potential for a
buffer overflow.
At least we can pretty safety assume that the system error messages won't be
overly long.
The alternative is to fall back on strerror(), but that has reentrancy issues.