diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2002-06-14 16:40:55 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2002-06-14 16:40:55 +0000 |
commit | d68a49f366b819cf2e690e327a41b4a3f1a7ce78 (patch) | |
tree | 6d3b74f3e119097aa5a692a85d930bfbab66fc16 | |
parent | b1aa5c68fc1d4cc823a8eee6edc26f429f1ed876 (diff) | |
download | ATCD-d68a49f366b819cf2e690e327a41b4a3f1a7ce78.tar.gz |
ChangeLogTag:Fri Jun 14 09:34:41 2002 Ossama Othman <ossama@uci.edu>
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 10 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 10 | ||||
-rw-r--r-- | ace/OS.i | 4 |
4 files changed, 32 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index e9fa6d22a56..a81469fc4a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Fri Jun 14 09:34:41 2002 Ossama Othman <ossama@uci.edu> + + * ace/OS.i (ctime): + + For the ACE_HAS_WINCE, pass a statically allocated buffer to + ctime_r() since ctime_r() will return that same buffer as the + return value of ctime(). Fixes memory access violations. + Thanks to Michael Searles <msearles@base16.com> for pointing out + the problem. + Thu Jun 13 21:26:49 2002 Steve Huston <shuston@riverace.com> * ace/Configuration_Import_Export.cpp (squish): Replaced use diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index e9fa6d22a56..a81469fc4a0 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,13 @@ +Fri Jun 14 09:34:41 2002 Ossama Othman <ossama@uci.edu> + + * ace/OS.i (ctime): + + For the ACE_HAS_WINCE, pass a statically allocated buffer to + ctime_r() since ctime_r() will return that same buffer as the + return value of ctime(). Fixes memory access violations. + Thanks to Michael Searles <msearles@base16.com> for pointing out + the problem. + Thu Jun 13 21:26:49 2002 Steve Huston <shuston@riverace.com> * ace/Configuration_Import_Export.cpp (squish): Replaced use diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index e9fa6d22a56..a81469fc4a0 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,13 @@ +Fri Jun 14 09:34:41 2002 Ossama Othman <ossama@uci.edu> + + * ace/OS.i (ctime): + + For the ACE_HAS_WINCE, pass a statically allocated buffer to + ctime_r() since ctime_r() will return that same buffer as the + return value of ctime(). Fixes memory access violations. + Thanks to Michael Searles <msearles@base16.com> for pointing out + the problem. + Thu Jun 13 21:26:49 2002 Steve Huston <shuston@riverace.com> * ace/Configuration_Import_Export.cpp (squish): Replaced use @@ -992,7 +992,7 @@ ACE_OS::cuserid (char *user, size_t maxlen) const size_t ACE_L_cuserid = 9; // 8 character user ID + NULL #endif /* _POSIX_SOURCE */ - static ACE_TCHAR tmp[ACE_L_cuserid] = { 0 }; + static ACE_TCHAR tmp[ACE_L_cuserid] = { '\0' }; max_length = ACE_L_cuserid - 1; // Do not include NULL in length userid = tmp; @@ -8865,7 +8865,7 @@ ACE_OS::ctime (const time_t *t) #elif defined(ACE_PSOS) && ! defined (ACE_PSOS_HAS_TIME) return "ctime-return"; #elif defined (ACE_HAS_WINCE) - ACE_TCHAR buf[26]; // 26 is a "magic number" ;) + static ACE_TCHAR buf[26]; // 26 is a "magic number" ;) return ACE_OS::ctime_r (t, buf, 26); #elif defined (ACE_USES_WCHAR) ACE_OSCALL_RETURN (::_wctime (t), wchar_t *, 0); |