diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2000-09-30 00:19:50 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2000-09-30 00:19:50 +0000 |
commit | a16e46a3b553588fe679d1190404e65f48d2baa3 (patch) | |
tree | a51a85a6a8f0ef78cacf9ac6c12bddf5efd477f7 /TAO/tao/corbafwd.cpp | |
parent | ca599cce793a25828b71841477003ca20569bf5c (diff) | |
download | ATCD-a16e46a3b553588fe679d1190404e65f48d2baa3.tar.gz |
ChangeLogTag:Fri Sep 29 17:17:08 2000 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'TAO/tao/corbafwd.cpp')
-rw-r--r-- | TAO/tao/corbafwd.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/TAO/tao/corbafwd.cpp b/TAO/tao/corbafwd.cpp index df687262830..de4f368602e 100644 --- a/TAO/tao/corbafwd.cpp +++ b/TAO/tao/corbafwd.cpp @@ -20,6 +20,10 @@ CORBA::string_dup (const char *str) // This allocates an extra byte for the '\0'; char * copy = CORBA::string_alloc (len); + if (copy == 0) + return 0; // The below memcpy() assumes that the destination is + // a valid buffer. + ACE_OS::memcpy (copy, str, len + 1); return copy; } @@ -38,6 +42,11 @@ CORBA::wstring_dup (const WChar *const str) } CORBA::WChar* retval = CORBA::wstring_alloc (ACE_OS::wslen (str)); + + if (retval == 0) + return 0; // The below wscpy() assumes that the destination is + // a valid buffer. + return ACE_OS::wscpy (retval, str); } |