gozk crashes when trying to get null data

Bug #1302789 reported by Alexey Borzenkov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gozk
New
Undecided
Unassigned

Bug Description

When node has NULL data gozk crashes in Conn.Get(). The reason is that in such cases zoo_wget returns -1 in buffer_len, which GoStringN interprets as a very huge string size, and which ultimately leads to a crash. Since by default ZooKeeper has at least one node that has NULL data it's very easy to get a crash by enumerating all nodes and calling Conn.Get for all of them. The patch I attached should fix the problem.

Revision history for this message
Alexey Borzenkov (snaury) wrote :
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.