[
https://issues.apache.org/jira/browse/TS-3822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14659449#comment-14659449
]
ASF subversion and git services commented on TS-3822:
-----------------------------------------------------
Commit 1c2ea99cff9de7044226fee9c9f02b4273abae53 in trafficserver's branch
refs/heads/6.0.x from [~zwoop]
[ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=1c2ea99 ]
Merge branch 'master' into 6.0.x
* master:
TS-3822 clang-analyzer: Value stored to 'stream' during its initialization is
never read
TS-3824 Fix #include of pcre for a couple of plugins
TS-3825 epic plugin does not compile on OmniOS
TS-3824 Fix #include of pcre for a couple of plugins
TS-3658 ASAN triggers when using the escalate.so plugin
TS-3823 Fix tests for -lpthread since the previous commit breaks on FreeBSD
TS-3823 Fix tests for -lpthread, and undo some of TS-3308. This retains the
support for ASAN in a cleaner way
TS-3823 ASAN makes us forget to add -ldl on the LIBS
TS-3811 HTTP/2 window size must not exceed 2^31-1
TS-3497: Define Http2Error to classify errors
TS-3799: Fix handling of padding in DATA frames
TS-3814 Treat requests with Connection header field as malformed, as per specs
TS-3782: Add normal scenario tests for HTTP/2
> clang-analyzer: Value stored to 'stream' during its initialization is never
> read
> --------------------------------------------------------------------------------
>
> Key: TS-3822
> URL: https://issues.apache.org/jira/browse/TS-3822
> Project: Traffic Server
> Issue Type: Bug
> Components: HTTP/2
> Reporter: Leif Hedstrom
> Assignee: Leif Hedstrom
> Fix For: 6.0.0
>
>
> Http2Stream *stream = cstate.find_stream(id);
> Value stored to 'stream' during its initialization is never read
> Assuming the code is correct, I suggest the following patch:
> {code}
> diff --git a/proxy/http2/Http2ConnectionState.cc
> b/proxy/http2/Http2ConnectionState.cc
> index 4244468..3d94dfd 100644
> --- a/proxy/http2/Http2ConnectionState.cc
> +++ b/proxy/http2/Http2ConnectionState.cc
> @@ -173,13 +173,13 @@ rcv_headers_frame(Http2ClientSession &cs,
> Http2ConnectionState &cstate, const Ht
> return Http2Error(HTTP2_ERROR_CLASS_CONNECTION,
> HTTP2_ERROR_PROTOCOL_ERROR);
> }
>
> - Http2Stream *stream = cstate.find_stream(id);
> if (id <= cstate.get_latest_stream_id()) {
> return Http2Error(HTTP2_ERROR_CLASS_STREAM, HTTP2_ERROR_STREAM_CLOSED);
> }
>
> // Create new stream
> - stream = cstate.create_stream(id);
> + Http2Stream *stream = cstate.create_stream(id);
> +
> if (!stream) {
> return Http2Error(HTTP2_ERROR_CLASS_CONNECTION,
> HTTP2_ERROR_PROTOCOL_ERROR);
> }
> {code}
> [~masaori], [~rokubo] or [~maskit] Does that seem reasonable?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)