You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by ph...@apache.org on 2016/03/11 07:35:33 UTC

svn commit: r1734500 - in /zookeeper/branches/branch-3.4: CHANGES.txt src/contrib/zkperl/ZooKeeper.xs

Author: phunt
Date: Fri Mar 11 06:35:33 2016
New Revision: 1734500

URL: http://svn.apache.org/viewvc?rev=1734500&view=rev
Log:
ZOOKEEPER-2133 zkperl: Segmentation fault if getting a node with null value (Botond Hejj via phunt)

Modified:
    zookeeper/branches/branch-3.4/CHANGES.txt
    zookeeper/branches/branch-3.4/src/contrib/zkperl/ZooKeeper.xs

Modified: zookeeper/branches/branch-3.4/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/CHANGES.txt?rev=1734500&r1=1734499&r2=1734500&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/CHANGES.txt (original)
+++ zookeeper/branches/branch-3.4/CHANGES.txt Fri Mar 11 06:35:33 2016
@@ -8,6 +8,9 @@ BUGFIXES:
   ZOOKEEPER-2379: recent commit broke findbugs qabot check
   (rakeshr via cnauroth)
 
+  ZOOKEEPER-2133 zkperl: Segmentation fault if getting a node with
+  null value (Botond Hejj via phunt)
+
 Release 3.4.8 - 2016-02-05
 
 Backward compatible changes:

Modified: zookeeper/branches/branch-3.4/src/contrib/zkperl/ZooKeeper.xs
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.4/src/contrib/zkperl/ZooKeeper.xs?rev=1734500&r1=1734499&r2=1734500&view=diff
==============================================================================
--- zookeeper/branches/branch-3.4/src/contrib/zkperl/ZooKeeper.xs (original)
+++ zookeeper/branches/branch-3.4/src/contrib/zkperl/ZooKeeper.xs Fri Mar 11 06:35:33 2016
@@ -1713,7 +1713,7 @@ zk_get(zkh, path, ...)
                               old_watch, new_watch);
         }
 
-        if (ret == ZOK) {
+        if (ret == ZOK && buf_len != -1) {
             ST(0) = sv_newmortal();
 #ifdef SV_HAS_TRAILING_NUL
             buf[buf_len] = '\0';