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/28 21:52:25 UTC
[jira] [Updated] (TS-4310) Coverity issues 1353635, 1353636 and
1353637
[ https://issues.apache.org/jira/browse/TS-4310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leif Hedstrom updated TS-4310:
------------------------------
Summary: Coverity issues 1353635, 1353636 and 1353637 (was: Coverity issues 1353631, 1353632, 1353633, 1353634)
> Coverity issues 1353635, 1353636 and 1353637
> --------------------------------------------
>
> Key: TS-4310
> URL: https://issues.apache.org/jira/browse/TS-4310
> Project: Traffic Server
> Issue Type: Bug
> Reporter: Leif Hedstrom
> Fix For: 6.2.0
>
>
> Coverity keeps finding new ones faster than I can fix the old ones ...
> {code}
> ** CID 1353637: Error handling issues (CHECKED_RETURN)
> /plugins/experimental/stale_while_revalidate/stale_while_revalidate.c: 576 in main_plugin()
> ________________________________________________________________________________________________________
> *** CID 1353637: Error handling issues (CHECKED_RETURN)
> /plugins/experimental/stale_while_revalidate/stale_while_revalidate.c: 576 in main_plugin()
> 570 TSfree(state);
> 571 }
> 572 TSHttpTxnReenable(txn, TS_EVENT_HTTP_CONTINUE);
> 573 }
> 574 break;
> 575 case TS_EVENT_HTTP_READ_RESPONSE_HDR:
> CID 1353637: Error handling issues (CHECKED_RETURN)
> Calling "TSHttpTxnServerRespGet" without checking return value (as is done elsewhere 26 out of 32 times).
> 576 TSHttpTxnServerRespGet(txn, &buf, &loc);
> 577 http_status = TSHttpHdrStatusGet(buf, loc);
> 578 if ((http_status == 500) || ((http_status >= 502) && (http_status <= 504))) // 500, 502, 503, or 504
> 579 {
> 580 TSDebug(PLUGIN_NAME, "Set non-cachable");
> 581 #if (TS_VERSION_NUMBER >= 3003000)
> ** CID 1353636: (CHECKED_RETURN)
> /example/thread-pool/psi.c: 890 in transformable()
> /example/bnull-transform/bnull-transform.c: 267 in transformable()
> /example/append-transform/append-transform.c: 252 in transformable()
> /example/null-transform/null-transform.c: 262 in transformable()
> ________________________________________________________________________________________________________
> *** CID 1353636: (CHECKED_RETURN)
> /example/thread-pool/psi.c: 890 in transformable()
> 884 with a Content-Type: text/ header and with X-Psi header */
> 885 TSMBuffer bufp;
> 886 TSMLoc hdr_loc, field_loc;
> 887 TSHttpStatus resp_status;
> 888 const char *value;
> 889
> CID 1353636: (CHECKED_RETURN)
> Calling "TSHttpTxnServerRespGet" without checking return value (as is done elsewhere 26 out of 32 times).
> 890 TSHttpTxnServerRespGet(txnp, &bufp, &hdr_loc);
> 891
> 892 resp_status = TSHttpHdrStatusGet(bufp, hdr_loc);
> 893 if (resp_status != TS_HTTP_STATUS_OK) {
> 894 TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
> 895 return 0;
> /example/bnull-transform/bnull-transform.c: 267 in transformable()
> 261 TSMLoc hdr_loc;
> 262 TSHttpStatus resp_status;
> 263 int retv;
> 264
> 265 /* We are only interested in transforming "200 OK" responses. */
> 266
> CID 1353636: (CHECKED_RETURN)
> Calling "TSHttpTxnServerRespGet" without checking return value (as is done elsewhere 26 out of 32 times).
> 267 TSHttpTxnServerRespGet(txnp, &bufp, &hdr_loc);
> 268 resp_status = TSHttpHdrStatusGet(bufp, hdr_loc);
> 269 retv = (resp_status == TS_HTTP_STATUS_OK);
> 270
> 271 if (TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc) == TS_ERROR) {
> 272 TSError("[bnull-transform] Error releasing MLOC while checking "
> /example/append-transform/append-transform.c: 252 in transformable()
> 246 TSMLoc hdr_loc;
> 247 TSMLoc field_loc;
> 248 TSHttpStatus resp_status;
> 249 const char *value;
> 250 int val_length;
> 251
> CID 1353636: (CHECKED_RETURN)
> Calling "TSHttpTxnServerRespGet" without checking return value (as is done elsewhere 26 out of 32 times).
> 252 TSHttpTxnServerRespGet(txnp, &bufp, &hdr_loc);
> 253
> 254 /*
> 255 * We are only interested in "200 OK" responses.
> 256 */
> 257
> /example/null-transform/null-transform.c: 262 in transformable()
> 256 TSMLoc hdr_loc;
> 257 TSHttpStatus resp_status;
> 258 int retv;
> 259
> 260 TSDebug("null-transform", "Entering transformable()");
> 261
> CID 1353636: (CHECKED_RETURN)
> Calling "TSHttpTxnServerRespGet" without checking return value (as is done elsewhere 26 out of 32 times).
> 262 TSHttpTxnServerRespGet(txnp, &bufp, &hdr_loc);
> 263 resp_status = TSHttpHdrStatusGet(bufp, hdr_loc);
> 264 retv = (resp_status == TS_HTTP_STATUS_OK);
> 265
> 266 if (TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc) == TS_ERROR) {
> 267 TSError("[null-transform] Error releasing MLOC while checking "
> ** CID 1353635: Error handling issues (CHECKED_RETURN)
> /plugins/gzip/gzip.cc: 475 in gzip_transformable(tsapi_httptxn *, bool, Gzip::HostConfiguration *, int *)()
> ________________________________________________________________________________________________________
> *** CID 1353635: Error handling issues (CHECKED_RETURN)
> /plugins/gzip/gzip.cc: 475 in gzip_transformable(tsapi_httptxn *, bool, Gzip::HostConfiguration *, int *)()
> 469 const char *value;
> 470 int nvalues;
> 471 int i, compression_acceptable, len;
> 472 TSHttpStatus resp_status;
> 473
> 474 if (server) {
> CID 1353635: Error handling issues (CHECKED_RETURN)
> Calling "TSHttpTxnServerRespGet" without checking return value (as is done elsewhere 26 out of 32 times).
> 475 TSHttpTxnServerRespGet(txnp, &bufp, &hdr_loc);
> 476 } else {
> 477 TSHttpTxnCachedRespGet(txnp, &bufp, &hdr_loc);
> 478 }
> 479 resp_status = TSHttpHdrStatusGet(bufp, hdr_loc);
> 480 TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)