summaryrefslogtreecommitdiff
path: root/ACE
diff options
context:
space:
mode:
Diffstat (limited to 'ACE')
-rw-r--r--ACE/ChangeLog7
-rw-r--r--ACE/ace/OS_NS_string.cpp3
2 files changed, 10 insertions, 0 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index d9d5b30e15f..55f0ff9bc16 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,10 @@
+Thu Jul 23 16:40:55 UTC 2009 Douglas C. Schmidt <schmidt@dre.vanderbilt.edu>
+
+ * ace/OS_NS_string.cpp: Added some additional error checking to
+ ACE_OS::strerror() to avoid problems when errnum is out of
+ bounds. Thanks to Aleksandar Vukajlovic <aleksandar dot
+ vukajlovic at finsoft dot rs> for reporting this.
+
Thu Jul 23 18:10:12 UTC 2009 Johnny Willemsen <jwillemsen@remedy.nl>
* rpmbuild/ace-tao-ciao.spec:
diff --git a/ACE/ace/OS_NS_string.cpp b/ACE/ace/OS_NS_string.cpp
index 504d3df7e26..8277f5a9eef 100644
--- a/ACE/ace/OS_NS_string.cpp
+++ b/ACE/ace/OS_NS_string.cpp
@@ -125,6 +125,9 @@ ACE_OS::strerror (int errnum)
errmsg = ret_errortext;
ACE_SECURECRTCALL (strerror_s (ret_errortext, sizeof(ret_errortext), errnum),
char *, 0, errmsg);
+ if (errnum < 0 || errnum >= _sys_nerr)
+ g = EINVAL;
+
return errmsg;
#elif defined (ACE_WIN32)
if (errnum < 0 || errnum >= _sys_nerr)