You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Leif Hedstrom (JIRA)" <ji...@apache.org> on 2016/01/18 05:51:39 UTC

[jira] [Resolved] (TS-4140) CID 1348541: Control flow issues (DEADCODE)

     [ https://issues.apache.org/jira/browse/TS-4140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom resolved TS-4140.
-------------------------------
    Resolution: Fixed

> CID 1348541:  Control flow issues  (DEADCODE)
> ---------------------------------------------
>
>                 Key: TS-4140
>                 URL: https://issues.apache.org/jira/browse/TS-4140
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Web UI
>            Reporter: Leif Hedstrom
>            Assignee: Leif Hedstrom
>              Labels: coverity
>             Fix For: 6.1.0
>
>
> This is due to TS-4106, and I believe coverity is correct; q can't be NULL.
> {code}
> *** 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);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)