[jira] Updated: (ZOOKEEPER-182) zookeeper_init accepts empty host-port string and returns valid pointer to zhandle_t.

2008-10-14 Thread Patrick Hunt (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Patrick Hunt updated ZOOKEEPER-182:
---

   Resolution: Fixed
Fix Version/s: 3.0.0
 Hadoop Flags: [Reviewed]
   Status: Resolved  (was: Patch Available)

Committed revision 704657.

 zookeeper_init accepts empty host-port string and returns valid pointer to 
 zhandle_t.
 -

 Key: ZOOKEEPER-182
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-182
 Project: Zookeeper
  Issue Type: Bug
  Components: c client
 Environment: Linux
Reporter: Maxim P. Dementiev
Assignee: Maxim P. Dementiev
 Fix For: 3.0.0

 Attachments: ZOOKEEPER-182-UnitTests-Init-AddressString.patch, 
 ZOOKEEPER-182.patch


 Please, add this test to src/c/tests/TestZookeeperInit.cc to reproduce this:
 void testEmptyAddressString()
 {
 zh=zookeeper_init(,0,0,0,0,0);
 CPPUNIT_ASSERT(zh==0);
 }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-182) zookeeper_init accepts empty host-port string and returns valid pointer to zhandle_t.

2008-10-13 Thread Maxim P. Dementiev (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maxim P. Dementiev updated ZOOKEEPER-182:
-

Attachment: ZOOKEEPER-182-UnitTests-Init-AddressString.patch

Contains new tests for zookeeper_init() function:
testNullAddressString, estEmptyAddressString, testOneSpaceAddressString, 
testTwoSpacesAddressString


 zookeeper_init accepts empty host-port string and returns valid pointer to 
 zhandle_t.
 -

 Key: ZOOKEEPER-182
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-182
 Project: Zookeeper
  Issue Type: Bug
  Components: c client
 Environment: Linux
Reporter: Maxim P. Dementiev
 Attachments: ZOOKEEPER-182-UnitTests-Init-AddressString.patch


 Please, add this test to src/c/tests/TestZookeeperInit.cc to reproduce this:
 void testEmptyAddressString()
 {
 zh=zookeeper_init(,0,0,0,0,0);
 CPPUNIT_ASSERT(zh==0);
 }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Updated: (ZOOKEEPER-182) zookeeper_init accepts empty host-port string and returns valid pointer to zhandle_t.

2008-10-13 Thread Maxim P. Dementiev (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maxim P. Dementiev updated ZOOKEEPER-182:
-

Attachment: ZOOKEEPER-182.patch

Attachment ZOOKEEPER-182.patch: if we check the input string for , we may 
check for NULL first - there is no any drawback.
I think it's good idea to check for NULL and exit with an appropriate error 
than do a coredump.
But in any case we have to check the input string before pass it to strdup().

 zookeeper_init accepts empty host-port string and returns valid pointer to 
 zhandle_t.
 -

 Key: ZOOKEEPER-182
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-182
 Project: Zookeeper
  Issue Type: Bug
  Components: c client
 Environment: Linux
Reporter: Maxim P. Dementiev
 Attachments: ZOOKEEPER-182-UnitTests-Init-AddressString.patch, 
 ZOOKEEPER-182.patch


 Please, add this test to src/c/tests/TestZookeeperInit.cc to reproduce this:
 void testEmptyAddressString()
 {
 zh=zookeeper_init(,0,0,0,0,0);
 CPPUNIT_ASSERT(zh==0);
 }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.