Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS-5006: Fix CID 1356975 #1140

Merged
merged 1 commit into from
Oct 27, 2016
Merged

TS-5006: Fix CID 1356975 #1140

merged 1 commit into from
Oct 27, 2016

Conversation

PSUdaemon
Copy link
Contributor

Check for NULL before pointer dereference.

@atsci
Copy link

atsci commented Oct 26, 2016

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/1083/ for details.

@atsci
Copy link

atsci commented Oct 26, 2016

Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/976/ for details.

Copy link
Contributor

@zwoop zwoop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a Jira number.

@PSUdaemon PSUdaemon changed the title Fix CID 1356975 TS-5006: Fix CID 1356975 Oct 26, 2016
@@ -3309,7 +3309,7 @@ HttpSM::tunnel_handler_ua(int event, HttpTunnelConsumer *c)

// only external POSTs should be subject to this logic; ruling out internal POSTs here
bool is_eligible_post_request = (t_state.method == HTTP_WKSIDX_POST);
if (is_eligible_post_request) {
if (is_eligible_post_request && ua_session) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know this code much, but seeing that we don't crash here, presumably ua_session generally is not NULL here. So maybe a better thing is a release assert?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @shinrich is looking at code further up where we check for NULLness of ua_session so maybe she can say more whether or not we should be asserting.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, looked at that. I don't think the NULL check around abort is necessary at all. So perhaps the easier thing is to remove that check.

@atsci
Copy link

atsci commented Oct 26, 2016

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/1093/ for details.

@atsci
Copy link

atsci commented Oct 26, 2016

Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/985/ for details.

ua_session can not be NULL so checking for it here only confuses coverity.
@atsci
Copy link

atsci commented Oct 26, 2016

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/1100/ for details.

@atsci
Copy link

atsci commented Oct 26, 2016

Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/993/ for details.

@zwoop zwoop merged commit 48eda68 into apache:master Oct 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants