<div dir="ltr"><div>nice!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 16 Jun 2021 at 03:03, D. Hugh Redelmeier <<a href="mailto:hugh@vault.libreswan.fi">hugh@vault.libreswan.fi</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">New commits:<br>
commit 0e67cf45937b7cd8b03c7bee24a3871dbb7618d6<br>
Author: D. Hugh Redelmeier <<a href="mailto:hugh@mimosa.com" target="_blank">hugh@mimosa.com</a>><br>
Date:   Wed Jun 16 02:47:01 2021 -0400<br>
<br>
    pluto: get rid of fake_md from aggr_outI1_continue()<br>
<br>
    Stimulus: Coverity flagged a possible null pointer dereference of<br>
    fake_md->smc<br>
<br>
    I hadn't heard of this crash actually happening.  The reason is that<br>
    the "result" parameter for complete_v1_state_transition would normally<br>
    be STF_IGNORE and the function would return early with no crash.  In<br>
    theory, STF_INTERNAL_ERROR was possible but probably never happened.<br>
<br>
    I added a pexpect(e == STF_IGNORE) to aggr_outI1_continue.  This<br>
    should be replaced by appropriate logging.  Unfortunately I no longer<br>
    know how to log.<br>
<br>
    aggr_outI1_continue's call of complete_v1_state_transition is now<br>
    hardwired to use STF_IGNORE<br>
<br>
    complete_v1_state_transition's passert(md != NULL) was moved to avoid<br>
    demanding an md when none is needed.  (This passert seems silly since<br>
    all hardware we run on will catch null pointer dereferences.)<br></blockquote><div><br></div><div>The log output is more readable.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
    At this point, fake_md became useless.  And also md's fake_dne field.<br>
<br>
    I cannot guarantee that Coverity will see that the NULL dereference is<br>
    eliminated.<br>
<br>
_______________________________________________<br>
Swan-commit mailing list<br>
<a href="mailto:Swan-commit@lists.libreswan.org" target="_blank">Swan-commit@lists.libreswan.org</a><br>
<a href="https://lists.libreswan.org/mailman/listinfo/swan-commit" rel="noreferrer" target="_blank">https://lists.libreswan.org/mailman/listinfo/swan-commit</a><br>
</blockquote></div></div>