Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
3.3.5
-
None
-
None
Description
prepend_string, called before any checks for NULL in the c client for many API functions, has this line (zookeeper 3.3.5):
if (zh->chroot == NULL)
That means that before you check for NULL, you are dereferencing the pointer. This bug does not exist in the 3.4.* branch for whatever reason, but it still remains in the 3.3.* line. A patch which fixes it would make the line as follows:
if (zh == NULL || zh->chroot == NULL)
I would do that for you, but I don't know how to patch the 3.3.5 branch.
Attachments
Attachments
Issue Links
- duplicates
-
ZOOKEEPER-1305 zookeeper.c:prepend_string func can dereference null ptr
- Closed