[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266236#comment-13266236
 ] 

Henry Robinson commented on ZOOKEEPER-1461:
-------------------------------------------

See ZOOKEEPER-1305 - this was fixed in trunk and 3.4, but not in 3.3. We should 
probably close this as a duplicate and commit 1305 to 3.3. See my comment 
there. 
                
> Zookeeper C client doesn't check for NULL before dereferencing in 
> prepend_string
> --------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1461
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1461
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: c client
>    Affects Versions: 3.3.5
>            Reporter: Stephen Tyree
>            Assignee: Stephen Tyree
>             Fix For: 3.3.6
>
>         Attachments: ZOOKEEPER-1461.PATCH
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to