From 91cc23f0fd5d399171e9825d81627cf207d7b299 Mon Sep 17 00:00:00 2001 From: Abdullah Sowayan Date: Thu, 28 Jun 2007 00:06:10 +0000 Subject: Thu Jun 28 00:03:58 UTC 2007 Abdullah Sowayan --- TAO/ChangeLog | 18 +++++++++++++++++- TAO/tao/Acceptor_Registry.cpp | 6 +++--- TAO/tao/CSD_ThreadPool/CSD_TP_Task.cpp | 4 ++++ TAO/tao/ORB.cpp | 6 +++--- TAO/tao/Profile.cpp | 6 +++--- TAO/tao/Reactive_Connect_Strategy.cpp | 2 ++ TAO/tao/Strategies/SHMIOP_Acceptor.cpp | 4 ++-- TAO/tao/Strategies/UIOP_Profile.cpp | 4 ++-- TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp | 6 +++--- 9 files changed, 39 insertions(+), 17 deletions(-) (limited to 'TAO') diff --git a/TAO/ChangeLog b/TAO/ChangeLog index a430805168a..c227a8e787f 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,19 @@ +Thu Jun 28 00:03:58 UTC 2007 Abdullah Sowayan + + * tao/Acceptor_Registry.cpp: + * tao/CSD_ThreadPool/CSD_TP_Task.cpp: + * tao/ORB.cpp: + * tao/Profile.cpp: + * tao/Reactive_Connect_Strategy.cpp: + * tao/Strategies/SHMIOP_Acceptor.cpp: + * tao/Strategies/UIOP_Profile.cpp: + * tao/TypeCodeFactory/TypeCodeFactory_i.cpp: + + Fixed ACE_OS fuzz warnings. Use ACE_OS calls instead of raw OS function + where possible. If fuzz detected a false-positive, then disable + the ACE_OS fuzz check for that section of the code. + + Wed Jun 27 23:49:36 UTC 2007 Abdullah Sowayan * TAO_IDL/be/be_codegen.cpp: @@ -15,7 +31,7 @@ Wed Jun 27 23:49:36 UTC 2007 Abdullah Sowayan * TAO_IDL/be/be_codegen.cpp: - + Fixed a bug introduced in: Wed Jun 27 09:10:21 UTC 2007 Jeff Parsons diff --git a/TAO/tao/Acceptor_Registry.cpp b/TAO/tao/Acceptor_Registry.cpp index 1b3480e4505..491a85613a5 100644 --- a/TAO/tao/Acceptor_Registry.cpp +++ b/TAO/tao/Acceptor_Registry.cpp @@ -18,7 +18,7 @@ #include "ace/Auto_Ptr.h" #include "ace/OS_NS_string.h" -#include "ace/os_include/os_ctype.h" +#include "ace/OS_NS_ctype.h" #include "ace/CORBA_macros.h" #if !defined(__ACE_INLINE__) @@ -667,9 +667,9 @@ TAO_Acceptor_Registry::extract_endpoint_version (ACE_CString &address, major = TAO_DEF_GIOP_MAJOR; minor = TAO_DEF_GIOP_MINOR; - if (isdigit (address[0]) + if (ACE_OS::ace_isdigit (address[0]) && address[1] == '.' - && isdigit (address[2]) + && ACE_OS::ace_isdigit (address[2]) && address[3] == '@') { major = address[0] - '0'; diff --git a/TAO/tao/CSD_ThreadPool/CSD_TP_Task.cpp b/TAO/tao/CSD_ThreadPool/CSD_TP_Task.cpp index 5ce745c230e..cf1ae10c457 100644 --- a/TAO/tao/CSD_ThreadPool/CSD_TP_Task.cpp +++ b/TAO/tao/CSD_ThreadPool/CSD_TP_Task.cpp @@ -59,10 +59,12 @@ TAO::CSD::TP_Task::open(void* num_threads_ptr) if (tmp == 0) { + //FUZZ: disable check_for_lack_ACE_OS ACE_ERROR_RETURN((LM_ERROR, "(%P|%t) TP_Task failed to open. " "Invalid argument type passed to open().\n"), -1); + //FUZZ: enable check_for_lack_ACE_OS } num = *tmp; @@ -95,10 +97,12 @@ TAO::CSD::TP_Task::open(void* num_threads_ptr) // call as long as we haven't been open()'ed before. if (this->opened_) { + //FUZZ: disable check_for_lack_ACE_OS ACE_ERROR_RETURN((LM_ERROR, "(%P|%t) TP_Task failed to open. " "Task has previously been open()'ed.\n"), -1); + //FUZZ: enable check_for_lack_ACE_OS } // Activate this task object with 'num' worker threads. diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index 4f475ffb5a3..37e7293921d 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -44,7 +44,7 @@ ACE_RCSID (tao, #include "ace/Static_Object_Lock.h" #include "ace/OS_NS_strings.h" #include "ace/OS_NS_string.h" -#include "ace/os_include/os_ctype.h" +#include "ace/OS_NS_ctype.h" #include "ace/CORBA_macros.h" static const char ior_prefix[] = "IOR:"; @@ -1550,7 +1550,7 @@ CORBA::ORB::ior_string_to_object (const char *str) #undef byte unsigned char byte; - if (!(isxdigit (tmp [0]) && isxdigit (tmp [1]))) + if (!(ACE_OS::ace_isxdigit (tmp [0]) && ACE_OS::ace_isxdigit (tmp [1]))) break; byte = (u_char) (ACE::hex2byte (tmp [0]) << 4); @@ -1560,7 +1560,7 @@ CORBA::ORB::ior_string_to_object (const char *str) tmp += 2; } - if (tmp [0] && !isspace (tmp [0])) + if (tmp [0] && !ACE_OS::ace_isspace (tmp [0])) { throw ::CORBA::BAD_PARAM (); } diff --git a/TAO/tao/Profile.cpp b/TAO/tao/Profile.cpp index 8e7d1c16c2d..b3e3fff0e10 100644 --- a/TAO/tao/Profile.cpp +++ b/TAO/tao/Profile.cpp @@ -14,7 +14,7 @@ #include "ace/ACE.h" #include "ace/OS_NS_string.h" -#include "ace/os_include/os_ctype.h" +#include "ace/OS_NS_ctype.h" #if !defined (__ACE_INLINE__) #include "tao/Profile.inl" @@ -663,9 +663,9 @@ TAO_Profile::parse_string (const char *ior) // version is one that we accept. // Check for version - if (isdigit (ior [0]) && + if (ACE_OS::ace_isdigit (ior [0]) && ior[1] == '.' && - isdigit (ior [2]) && + ACE_OS::ace_isdigit (ior [2]) && ior[3] == '@') { // @@ This may fail for non-ascii character sets [but take that diff --git a/TAO/tao/Reactive_Connect_Strategy.cpp b/TAO/tao/Reactive_Connect_Strategy.cpp index 707c9ca9c4f..fec22b526d0 100644 --- a/TAO/tao/Reactive_Connect_Strategy.cpp +++ b/TAO/tao/Reactive_Connect_Strategy.cpp @@ -52,9 +52,11 @@ TAO_Reactive_Connect_Strategy::wait_i (TAO_LF_Event *ev, if (TAO_debug_level > 2) { + //FUZZ: disable check_for_lack_ACE_OS ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TAO (%P|%t) - Waiting in the Reactor for ") ACE_TEXT ("connection completion - wait ()\n"))); + //FUZZ: enable check_for_lack_ACE_OS } try diff --git a/TAO/tao/Strategies/SHMIOP_Acceptor.cpp b/TAO/tao/Strategies/SHMIOP_Acceptor.cpp index 5227669b74b..0e25183cd37 100644 --- a/TAO/tao/Strategies/SHMIOP_Acceptor.cpp +++ b/TAO/tao/Strategies/SHMIOP_Acceptor.cpp @@ -13,7 +13,7 @@ #include "tao/CDR.h" #include "ace/os_include/os_netdb.h" -#include "ace/os_include/os_ctype.h" +#include "ace/OS_NS_ctype.h" ACE_RCSID (Strategies, SHMIOP_Acceptor, @@ -196,7 +196,7 @@ TAO_SHMIOP_Acceptor::open (TAO_ORB_Core *orb_core, if (this->parse_options (options) == -1) return -1; - if (isdigit (*port) == 0) + if (ACE_OS::ace_isdigit (*port) == 0) return -1; // Port number must consist of digits if (port) diff --git a/TAO/tao/Strategies/UIOP_Profile.cpp b/TAO/tao/Strategies/UIOP_Profile.cpp index 8b37bb457d5..da04479103d 100644 --- a/TAO/tao/Strategies/UIOP_Profile.cpp +++ b/TAO/tao/Strategies/UIOP_Profile.cpp @@ -110,9 +110,9 @@ TAO_UIOP_Profile::parse_string_i (const char *string) // version is one that we accept. // Check for version - if (isdigit (string [0]) && + if (ACE_OS::ace_isdigit (string [0]) && string[1] == '.' && - isdigit (string [2]) && + ACE_OS::ace_isdigit (string [2]) && string[3] == '@') { // @@ This may fail for non-ascii character sets [but take that diff --git a/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp b/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp index 604dbadf85b..c5b26a4dbaf 100644 --- a/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp +++ b/TAO/tao/TypeCodeFactory/TypeCodeFactory_i.cpp @@ -37,7 +37,7 @@ #include "ace/OS_NS_string.h" #include "ace/Value_Ptr.h" -#include "ace/os_include/os_ctype.h" +#include "ace/OS_NS_ctype.h" ACE_RCSID (TypeCodeFactory, @@ -1481,7 +1481,7 @@ TAO_TypeCodeFactory_i::valid_name (const char *name) return true; } - if (!isalpha (*name)) + if (!ACE_OS::ace_isalpha (*name)) { return false; } @@ -1490,7 +1490,7 @@ TAO_TypeCodeFactory_i::valid_name (const char *name) for (; *tmp; ++tmp) { - if (isalnum (*tmp) || *tmp == '_') + if (ACE_OS::ace_isalnum (*tmp) || *tmp == '_') { continue; } -- cgit v1.2.1