nixpkgs/pkgs/tools/filesystems/zkfuse/zookeeper-1929.patch

16 lines
480 B
Diff
Raw Normal View History

2015-11-20 00:53:34 +00:00
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 );
}
}