[
https://issues.apache.org/jira/browse/TS-4140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15103977#comment-15103977
]
ASF GitHub Bot commented on TS-4140:
------------------------------------
Github user maskit commented on the pull request:
https://github.com/apache/trafficserver/pull/427#issuecomment-172394940
Looks good to me.
> 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)