[GitHub] trafficserver pull request #1120: TS-4978: illegal memory access with ticket...

2016-11-01 Thread SolidWallOfCode
Github user SolidWallOfCode closed the pull request at:

https://github.com/apache/trafficserver/pull/1120


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1120: TS-4978: illegal memory access with ticket...

2016-10-18 Thread persiaAziz
Github user persiaAziz commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1120#discussion_r83942590
  
--- Diff: iocore/net/SSLConfig.cc ---
@@ -253,8 +253,8 @@ SSLConfigParams::initialize()
   ats_free(CACertRelativePath);
 
 #if HAVE_OPENSSL_SESSION_TICKETS
-  REC_ReadConfigStringAlloc(ticket_key_filename, 
"proxy.config.ssl.server.ticket_key.filename");
--- End diff --

was avoiding long statement


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1120: TS-4978: illegal memory access with ticket...

2016-10-18 Thread SolidWallOfCode
Github user SolidWallOfCode commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1120#discussion_r83941058
  
--- Diff: iocore/net/SSLConfig.cc ---
@@ -112,7 +112,7 @@ SSLConfigParams::cleanup()
   ats_free_null(client_cipherSuite);
   ats_free_null(dhparamsFile);
   ats_free_null(ssl_wire_trace_ip);
-  ats_free_null(ticket_key_filename);
+  ticket_key_filename = (char *)ats_free_null(ticket_key_filename);
--- End diff --

Let's go bigger. Pull the code out of the constructor, make it a method, 
and then call that at the end of this method. Reset everything, really clean up.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1120: TS-4978: illegal memory access with ticket...

2016-10-18 Thread SolidWallOfCode
Github user SolidWallOfCode commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1120#discussion_r83940469
  
--- Diff: iocore/net/SSLConfig.cc ---
@@ -253,8 +253,8 @@ SSLConfigParams::initialize()
   ats_free(CACertRelativePath);
 
 #if HAVE_OPENSSL_SESSION_TICKETS
-  REC_ReadConfigStringAlloc(ticket_key_filename, 
"proxy.config.ssl.server.ticket_key.filename");
--- End diff --

Why not just embed the call in the `if`?
```
if (REC_ERR_OKAY == REC_ReadConfigString(...)) {
```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1120: TS-4978: illegal memory access with ticket...

2016-10-18 Thread persiaAziz
GitHub user persiaAziz opened a pull request:

https://github.com/apache/trafficserver/pull/1120

TS-4978: illegal memory access with ticket_key.filename

Avoiding illegal memory access by checking the return value of 
readConfigStringAlloc . 

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/persiaAziz/trafficserver TS-4978

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/trafficserver/pull/1120.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1120


commit c66b94ab044d851458954a3e14f0fca37d9e8d52
Author: Persia Aziz 
Date:   2016-10-18T19:53:59Z

TS-4978: illegal memory access with ticket_key.filename




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---