zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brettKK <...@git.apache.org>
Subject [GitHub] zookeeper pull request #495: ZOOKEEPER-3007:Potential NPE in ReferenceCounte...
Date Thu, 19 Apr 2018 15:47:58 GMT
GitHub user brettKK reopened a pull request:

    https://github.com/apache/zookeeper/pull/495

    ZOOKEEPER-3007:Potential NPE in ReferenceCountedACLCache#deserialize

    @LJ1043041006 found a potential NPE in ZK
    ----
    callee BinaryInputArchive#startVector will return null:
    ```
    // code placeholder
    public Index startVector(String tag) throws IOException {
        int len = readInt(tag);
         if (len == -1) {
         return null;
    }
    ```
    
    -----
    and caller ReferenceCountedACLCache#deserialize  call it without null check
    ```
    // code placeholder
    Index j = ia.startVector("acls");
    while (!j.done()) {
      ACL acl = new ACL();
      acl.deserialize(ia, "acl");
    }
    ```


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/brettKK/zookeeper master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zookeeper/pull/495.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #495
    
----
commit 7d8d5230c5a87faef94d038a258b159a322f3f5e
Author: gongleigl.gong <gongleigl.gong@...>
Date:   2018-03-26T13:16:06Z

    d

commit 700dfb7f48f774dd215e5bf19340a4b61eda3397
Author: gongleigl.gong <gongleigl.gong@...>
Date:   2018-03-27T16:38:28Z

    fix NPE bug

----


---

Mime
View raw message