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/03/27 21:01:25 UTC
[jira] [Updated] (TS-4308) Coverity issues 1353631, 1353632,
1353633, 1353634
[ https://issues.apache.org/jira/browse/TS-4308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leif Hedstrom updated TS-4308:
------------------------------
Fix Version/s: 6.2.0
> Coverity issues 1353631, 1353632, 1353633, 1353634
> --------------------------------------------------
>
> Key: TS-4308
> URL: https://issues.apache.org/jira/browse/TS-4308
> Project: Traffic Server
> Issue Type: Bug
> Components: Core, Plugins
> Reporter: Leif Hedstrom
> Assignee: Leif Hedstrom
> Fix For: 6.2.0
>
>
> {code}
> *** CID 1353634: Uninitialized members (UNINIT_CTOR)
> /proxy/http/HttpConfig.h: 394 in OverridableHttpConfigParams::OverridableHttpConfigParams()()
> 388 // Strings / floats must come last
> 389 body_factory_template_base(NULL), body_factory_template_base_len(0), proxy_response_server_string(NULL),
> 390 proxy_response_server_string_len(0), global_user_agent_header(NULL), global_user_agent_header_size(0),
> 391 cache_heuristic_lm_factor(0.10), freshness_fuzz_prob(0.005), background_fill_threshold(0.5), cache_open_write_fail_action(0),
> 392 redirection_enabled(0), redirect_use_orig_cache_key(0), number_of_redirections(1)
> 393 {
> CID 1353634: Uninitialized members (UNINIT_CTOR)
> Non-static class member "attach_server_session_to_client" is not initialized in this constructor nor in any functions that it calls.
> 394 }
> 395
> 396 // A few rules here:
> 397 // 1. Place all MgmtByte configs before all other configs
> 398 // 1. all MgmtInt/Byte configs should come before string / float configs.
> 399
> ** CID 1353633: Error handling issues (CHECKED_RETURN)
> /plugins/gzip/gzip.cc: 488 in gzip_transformable(tsapi_httptxn *, bool, Gzip::HostConfiguration *, int *)()
> ________________________________________________________________________________________________________
> *** CID 1353633: Error handling issues (CHECKED_RETURN)
> /plugins/gzip/gzip.cc: 488 in gzip_transformable(tsapi_httptxn *, bool, Gzip::HostConfiguration *, int *)()
> 482 // conservatively pick some statusses to compress
> 483 if (!(resp_status == 200 || resp_status == 404 || resp_status == 500)) {
> 484 info("http response status [%d] is not compressible", resp_status);
> 485 return 0;
> 486 }
> 487
> CID 1353633: Error handling issues (CHECKED_RETURN)
> Calling "TSHttpTxnClientReqGet" without checking return value (as is done elsewhere 40 out of 42 times).
> 488 TSHttpTxnClientReqGet(txnp, &cbuf, &chdr);
> 489
> 490 // the only compressible method is currently GET.
> 491 int method_length;
> 492 const char *method = TSHttpHdrMethodGet(cbuf, chdr, &method_length);
> 493
> ** CID 1353632: Error handling issues (CHECKED_RETURN)
> /plugins/gzip/gzip.cc: 477 in gzip_transformable(tsapi_httptxn *, bool, Gzip::HostConfiguration *, int *)()
> ________________________________________________________________________________________________________
> *** CID 1353632: Error handling issues (CHECKED_RETURN)
> /plugins/gzip/gzip.cc: 477 in gzip_transformable(tsapi_httptxn *, bool, Gzip::HostConfiguration *, int *)()
> 471 int i, compression_acceptable, len;
> 472 TSHttpStatus resp_status;
> 473
> 474 if (server) {
> 475 TSHttpTxnServerRespGet(txnp, &bufp, &hdr_loc);
> 476 } else {
> CID 1353632: Error handling issues (CHECKED_RETURN)
> Calling "TSHttpTxnCachedRespGet" without checking return value (as is done elsewhere 11 out of 13 times).
> 477 TSHttpTxnCachedRespGet(txnp, &bufp, &hdr_loc);
> 478 }
> 479 resp_status = TSHttpHdrStatusGet(bufp, hdr_loc);
> 480 TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
> 481
> 482 // conservatively pick some statusses to compress
> ** CID 1353631: API usage errors (ALLOC_FREE_MISMATCH)
> /plugins/experimental/geoip_acl/acl.cc: 240 in CountryAcl::read_regex(const char *)()
> ________________________________________________________________________________________________________
> *** CID 1353631: API usage errors (ALLOC_FREE_MISMATCH)
> /plugins/experimental/geoip_acl/acl.cc: 240 in CountryAcl::read_regex(const char *)()
> 234 std::string line;
> 235 RegexAcl *acl = NULL;
> 236
> 237 while (!f.eof()) {
> 238 getline(f, line);
> 239 ++lineno;
> CID 1353631: API usage errors (ALLOC_FREE_MISMATCH)
> Assigning: "acl" = "new RegexAcl(new CountryAcl)".
> 240 acl = new RegexAcl(new CountryAcl());
> 241 if (acl->parse_line(fn, line, lineno)) {
> 242 if (NULL == _regexes) {
> 243 _regexes = acl;
> 244 } else {
> 245 _regexes->append(acl);
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)