bug-commoncpp
[Top][All Lists]
Advanced

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

strerror_r(3) used incorrectly


From: Ari Johnson
Subject: strerror_r(3) used incorrectly
Date: Mon, 18 Nov 2002 21:43:44 -0600 (CST)

See included patch.  Note that my code assumes that that allocated
2048-byte buffer is large enough for any error string.  strerror_r(3) will
return 0 in this case, or will return ERANGE if not enough space was
available in the buffer.  As IOException::getSystemErrorString() is
declared throw(), I didn't see a better way to deal with the ERANGE
possibility other than wild assumption (although it really does seem a
valid assumption to me).

This patch is against the current CVS HEAD (21:45 CST, Nov 18)

Ari Johnson

Attachment: commoncpp2-exception.cpp-patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]