Boost C++ Libraries: Ticket #10088: Null Pointer Deference in engine.ipp https://svn.boost.org/trac10/ticket/10088 <p> <a class="ext-link" href="http://svn.boost.org/svn/boost/trunk/boost/asio/ssl/detail/impl/engine.ipp"><span class="icon">​</span>http://svn.boost.org/svn/boost/trunk/boost/asio/ssl/detail/impl/engine.ipp</a> </p> <p> In below code, ssl_ is checked to be non NUll (which is already done in costructor), which means it can be NULL, but passed to SSL_get_shutdown without NULL check. If it is passed to this function as NULL, it will crash. As ssl_ is already checked in constructor and there is no NULL check in other functions also, checking to not NULL in 214 is always true and hence can be avoided. Please apply the patch. </p> <pre class="wiki">212 // SSL v2 doesn't provide a protocol-level shutdown, so an eof on the 213 // underlying transport is passed through. 214 if (ssl_ &amp;&amp; ssl_-&gt;version == SSL2_VERSION) 215 return ec; 216 217 // Otherwise, the peer should have negotiated a proper shutdown. 218 if ((::SSL_get_shutdown(ssl_) &amp; SSL_RECEIVED_SHUTDOWN) == 0) </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10088 Trac 1.4.3 Gaurav Gupta <g.gupta@…> Tue, 03 Jun 2014 06:24:13 GMT attachment set https://svn.boost.org/trac10/ticket/10088 https://svn.boost.org/trac10/ticket/10088 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">engine.ipp.patch</span> </li> </ul> <p> Avoid possible NULL Pointer derefference . </p> Ticket