about summary refs log tree commit diff
path: root/pkgs/tools/filesystems/zkfuse/zookeeper-1929.patch
blob: e99dbdf33e039b57f6d2fd46c5ef06a440a16591 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/contrib/zkfuse/src/zkadapter.cc b/src/contrib/zkfuse/src/zkadapter.cc
index 886051d..93dbef5 100644
--- a/src/zkadapter.cc
+++ b/src/zkadapter.cc
@@ -845,7 +845,10 @@ ZooKeeperAdapter::getNodeData(const string &path,
             string("Unable to get data of node ") + path, rc 
         );
     } else {
-        return string( buffer, buffer + len );
+        if (len == -1) {
+            len = 0;
+        };
+        return string( buffer, len );
     }
 }