Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 7.0.0
    • Network

    Description

      ** 1237320 Dereference before null check **
      ___________________________________________
      660  event_notice = (TSMgmtEvent *)arg;
         	deref_ptr: Directly dereferencing pointer event_notice.
      661  index        = (int)event_notice->id;
      662  LLQ *func_q; // list of callback functions need to call
      663
      664  func_q = create_queue();
      665  if (!func_q) {
         	
      CID 1237320 (#1 of 1): Dereference before null check (REVERSE_INULL)
      check_after_deref: Null-checking event_notice suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
      666    if (event_notice)
      667      TSEventDestroy(event_notice);
      668    return NULL;
      669  }
       ___________________________________________
      

      Attachments

        Issue Links

          Activity

            githubbot ASF GitHub Bot added a comment -

            GitHub user strotyl opened a pull request:

            https://github.com/apache/trafficserver/pull/775

            TS-4598 : Coverity Null-Check after deref in NetworkUtilisRemote.cc

            This is fixing Coverity issue CID 1237320.

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

            $ git pull https://github.com/strotyl/trafficserver TS-4598

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

            https://github.com/apache/trafficserver/pull/775.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 #775


            commit dd9d9c8ef77c9bdd31ff8fb6ce998d2ec46cc73b
            Author: Tyler Stroh <tstroh@apple.com>
            Date: 2016-06-27T21:55:36Z

            TS-4598 : Coverity Null-Check after deref in NetworkUtilisRemote.cc

            This is fixing Coverity issue CID 1237320.


            githubbot ASF GitHub Bot added a comment - GitHub user strotyl opened a pull request: https://github.com/apache/trafficserver/pull/775 TS-4598 : Coverity Null-Check after deref in NetworkUtilisRemote.cc This is fixing Coverity issue CID 1237320. You can merge this pull request into a Git repository by running: $ git pull https://github.com/strotyl/trafficserver TS-4598 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/trafficserver/pull/775.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 #775 commit dd9d9c8ef77c9bdd31ff8fb6ce998d2ec46cc73b Author: Tyler Stroh <tstroh@apple.com> Date: 2016-06-27T21:55:36Z TS-4598 : Coverity Null-Check after deref in NetworkUtilisRemote.cc This is fixing Coverity issue CID 1237320.
            githubbot ASF GitHub Bot added a comment -

            Github user jpeach commented on the issue:

            https://github.com/apache/trafficserver/pull/775

            s/NetworkUtilisRemote/NetworkUtilsRemote/

            githubbot ASF GitHub Bot added a comment - Github user jpeach commented on the issue: https://github.com/apache/trafficserver/pull/775 s/NetworkUtilisRemote/NetworkUtilsRemote/
            githubbot ASF GitHub Bot added a comment -

            Github user zwoop commented on the issue:

            https://github.com/apache/trafficserver/pull/775

            Yeah, this seems right, TSEventDestroy() checks its argument, and we use it like this in several other places (which is likely why coverity gets confused). Consistency is good!

            githubbot ASF GitHub Bot added a comment - Github user zwoop commented on the issue: https://github.com/apache/trafficserver/pull/775 Yeah, this seems right, TSEventDestroy() checks its argument, and we use it like this in several other places (which is likely why coverity gets confused). Consistency is good!
            githubbot ASF GitHub Bot added a comment -

            Github user zwoop commented on the issue:

            https://github.com/apache/trafficserver/pull/775

            It seems there are merge conflicts here though, Tyler, can you please rebase your tree (which probably means pushing up the main master into your fork first) ?

            githubbot ASF GitHub Bot added a comment - Github user zwoop commented on the issue: https://github.com/apache/trafficserver/pull/775 It seems there are merge conflicts here though, Tyler, can you please rebase your tree (which probably means pushing up the main master into your fork first) ?
            githubbot ASF GitHub Bot added a comment -

            Github user strotyl commented on the issue:

            https://github.com/apache/trafficserver/pull/775

            Will do.

            githubbot ASF GitHub Bot added a comment - Github user strotyl commented on the issue: https://github.com/apache/trafficserver/pull/775 Will do.
            githubbot ASF GitHub Bot added a comment -

            Github user zwoop commented on the issue:

            https://github.com/apache/trafficserver/pull/775

            [approve ci]

            githubbot ASF GitHub Bot added a comment - Github user zwoop commented on the issue: https://github.com/apache/trafficserver/pull/775 [approve ci]
            githubbot ASF GitHub Bot added a comment -

            Github user atsci commented on the issue:

            https://github.com/apache/trafficserver/pull/775

            FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/399/ for details.

            githubbot ASF GitHub Bot added a comment - Github user atsci commented on the issue: https://github.com/apache/trafficserver/pull/775 FreeBSD build successful ! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/399/ for details.
            githubbot ASF GitHub Bot added a comment -

            Github user atsci commented on the issue:

            https://github.com/apache/trafficserver/pull/775

            Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/295/ for details.

            githubbot ASF GitHub Bot added a comment - Github user atsci commented on the issue: https://github.com/apache/trafficserver/pull/775 Linux build successful ! See https://ci.trafficserver.apache.org/job/Github-Linux/295/ for details.
            githubbot ASF GitHub Bot added a comment -

            Github user zwoop closed the pull request at:

            https://github.com/apache/trafficserver/pull/775

            githubbot ASF GitHub Bot added a comment - Github user zwoop closed the pull request at: https://github.com/apache/trafficserver/pull/775

            Commit 6ff69b7703e589cb75ae34cc4eebeac4d1084bf2 in trafficserver's branch refs/heads/master from Tyler Stroh
            [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=6ff69b7 ]

            TS-4598 : Coverity Null-Check after deref in NetworkUtilisRemote.cc

            This is fixing Coverity issue CID 1237320.

            jira-bot ASF subversion and git services added a comment - Commit 6ff69b7703e589cb75ae34cc4eebeac4d1084bf2 in trafficserver's branch refs/heads/master from Tyler Stroh [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=6ff69b7 ] TS-4598 : Coverity Null-Check after deref in NetworkUtilisRemote.cc This is fixing Coverity issue CID 1237320.

            Commit 715edafcbf711896cb983a93d183f62ca1a196b0 in trafficserver's branch refs/heads/master from Leif Hedstrom
            [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=715edaf ]

            Merge pull request #775 from strotyl/TS-4598

            TS-4598 Coverity: Null-Check after deref in NetworkUtilsRemote.cc

            jira-bot ASF subversion and git services added a comment - Commit 715edafcbf711896cb983a93d183f62ca1a196b0 in trafficserver's branch refs/heads/master from Leif Hedstrom [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=715edaf ] Merge pull request #775 from strotyl/ TS-4598 TS-4598 Coverity: Null-Check after deref in NetworkUtilsRemote.cc

            Commit 715edafcbf711896cb983a93d183f62ca1a196b0 in trafficserver's branch refs/heads/master from Leif Hedstrom
            [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=715edaf ]

            Merge pull request #775 from strotyl/TS-4598

            TS-4598 Coverity: Null-Check after deref in NetworkUtilsRemote.cc

            jira-bot ASF subversion and git services added a comment - Commit 715edafcbf711896cb983a93d183f62ca1a196b0 in trafficserver's branch refs/heads/master from Leif Hedstrom [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=715edaf ] Merge pull request #775 from strotyl/ TS-4598 TS-4598 Coverity: Null-Check after deref in NetworkUtilsRemote.cc

            People

              tstroh Tyler Stroh
              tstroh Tyler Stroh
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Slack

                  Issue deployment