zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r1212568 - in /zookeeper/branches/branch-3.4: CHANGES.txt src/c/src/zookeeper.c
Date Fri, 09 Dec 2011 18:37:30 GMT
Author: mahadev
Date: Fri Dec  9 18:37:30 2011
New Revision: 1212568

URL: http://svn.apache.org/viewvc?rev=1212568&view=rev
Log:
ZOOKEEPER-1317. Possible segfault in zookeeper_init. (Akira Kitada via mahadev)

Modified:
    zookeeper/branches/branch-3.4/CHANGES.txt
    zookeeper/branches/branch-3.4/src/c/src/zookeeper.c

Modified: zookeeper/branches/branch-3.4/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/CHANGES.txt?rev=1212568&r1=1212567&r2=1212568&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/CHANGES.txt (original)
+++ zookeeper/branches/branch-3.4/CHANGES.txt Fri Dec  9 18:37:30 2011
@@ -15,6 +15,9 @@ BUGFIXES: 
   ZOOKEEPER-1315. zookeeper_init always reports sessionPasswd=<hidden>.
   (Akira Kitada via mahadev)
 
+  ZOOKEEPER-1317. Possible segfault in zookeeper_init. 
+  (Akira Kitada via mahadev)
+
 Release 3.4.0 - 2011-10-25
 
 Non-backward compatible changes:

Modified: zookeeper/branches/branch-3.4/src/c/src/zookeeper.c
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/src/c/src/zookeeper.c?rev=1212568&r1=1212567&r2=1212568&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/src/c/src/zookeeper.c (original)
+++ zookeeper/branches/branch-3.4/src/c/src/zookeeper.c Fri Dec  9 18:37:30 2011
@@ -802,6 +802,9 @@ zhandle_t *zookeeper_init(const char *ho
     index_chroot = strchr(host, '/');
     if (index_chroot) {
         zh->chroot = strdup(index_chroot);
+        if (zh->chroot == NULL) {
+            goto abort;
+        }
         // if chroot is just / set it to null
         if (strlen(zh->chroot) == 1) {
             free(zh->chroot);



Mime
View raw message