[ 
https://issues.apache.org/jira/browse/TS-4140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15103981#comment-15103981
 ] 

ASF subversion and git services commented on TS-4140:
-----------------------------------------------------

Commit 7115b366b5e2946960175a596daf1b5374443876 in trafficserver's branch 
refs/heads/master from [~zwoop]
[ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=7115b36 ]

TS-4140 Fixes a coverity warning due to changes in TS-4106 (dead code)

This closes #427.


> 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)

Reply via email to