Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-4140

CID 1348541: Control flow issues (DEADCODE)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.1.0
    • Component/s: Tools
    • Labels:

      Description

      This is due to TS-4106, and I believe coverity is correct; q can't be NULL.

      *** CID 1348541:  Control flow issues  (DEADCODE)
      /iocore/cache/CachePages.cc: 129 in ShowCache::ShowCache(Continuation *, HTTPHdr *)()
      123               t = (char *)unescapedQuery + strlen(unescapedQuery);
      124             for (int s = 0; p < t; s++) {
      125               show_cache_urlstrs[s][0] = '\0';
      126               q = strstr(p, "%0D%0A" /* \r\n */); // we used this in the JS to separate urls
      127               if (!q)
      128                 q = t;
         CID 1348541:  Control flow issues  (DEADCODE)
         Execution cannot reach the expression "500UL" inside this statement: "ink_strlcpy(this->show_cach...".
      129               ink_strlcpy(show_cache_urlstrs[s], p, q ? q - p + 1 : sizeof(show_cache_urlstrs[s]));
      130               p = q + 6; // +6 ==> strlen(%0D%0A)
      131             }
      132           }
      133     
      134           Debug("cache_inspector", "there were %d url(s) passed in", nstrings == 1 ? 1 : nstrings - 1);
      
      

        Attachments

          Activity

            People

            • Assignee:
              zwoop Leif Hedstrom
              Reporter:
              zwoop Leif Hedstrom
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: