You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Stephen Tyree (JIRA)" <ji...@apache.org> on 2012/05/01 22:36:53 UTC

[jira] [Created] (ZOOKEEPER-1461) Zookeeper C client doesn't check for NULL before dereferencing in prepend_string

Stephen Tyree created ZOOKEEPER-1461:
----------------------------------------

             Summary: 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


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

        

[jira] [Commented] (ZOOKEEPER-1461) Zookeeper C client doesn't check for NULL before dereferencing in prepend_string

Posted by "Michi Mutsuzaki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266089#comment-13266089 ] 

Michi Mutsuzaki commented on ZOOKEEPER-1461:
--------------------------------------------

... should have previewed before posting....

{code}
svn co http://svn.apache.org/repos/asf/zookeeper/branches/branch-3.3/
{code}
                
> 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
>   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

        

[jira] [Commented] (ZOOKEEPER-1461) Zookeeper C client doesn't check for NULL before dereferencing in prepend_string

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266111#comment-13266111 ] 

Hadoop QA commented on ZOOKEEPER-1461:
--------------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12525220/ZOOKEEPER-1461.PATCH
  against trunk revision 1331246.

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    -1 patch.  The patch command could not apply the patch.

Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1056//console

This message is automatically generated.
                
> 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

        

[jira] [Commented] (ZOOKEEPER-1461) Zookeeper C client doesn't check for NULL before dereferencing in prepend_string

Posted by "Henry Robinson (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Commented] (ZOOKEEPER-1461) Zookeeper C client doesn't check for NULL before dereferencing in prepend_string

Posted by "Michi Mutsuzaki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266088#comment-13266088 ] 

Michi Mutsuzaki commented on ZOOKEEPER-1461:
--------------------------------------------

Hi Stephen,

The 3.3.* branch is under branches/branch-3.3. You can checkout the branch and make your change there. 

{code}
svn co http://svn.apache.org/repos/asf/zookeeper/branches/branch-3.3/
{code]

Thanks!
--Michi
                
> 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
>   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

        

[jira] [Updated] (ZOOKEEPER-1461) Zookeeper C client doesn't check for NULL before dereferencing in prepend_string

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-1461:
------------------------------------

    Fix Version/s:     (was: 3.3.6)
    
> 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
>         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

        

[jira] [Updated] (ZOOKEEPER-1461) Zookeeper C client doesn't check for NULL before dereferencing in prepend_string

Posted by "Stephen Tyree (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephen Tyree updated ZOOKEEPER-1461:
-------------------------------------

    Attachment: ZOOKEEPER-1461.PATCH
    
> 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
>             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

        

[jira] [Commented] (ZOOKEEPER-1461) Zookeeper C client doesn't check for NULL before dereferencing in prepend_string

Posted by "Stephen Tyree (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266142#comment-13266142 ] 

Stephen Tyree commented on ZOOKEEPER-1461:
------------------------------------------

Was it trying to apply the patch to trunk or the 3.3 branch?
                
> 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

        

[jira] [Commented] (ZOOKEEPER-1461) Zookeeper C client doesn't check for NULL before dereferencing in prepend_string

Posted by "Michi Mutsuzaki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13266196#comment-13266196 ] 

Michi Mutsuzaki commented on ZOOKEEPER-1461:
--------------------------------------------

Yeah it looks like it's trying to apply the patch to trunk. I don't know how to specify the build to use a specific branch. Any suggestions?

Thanks!
--Michi
                
> 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