[Swan-dev] Coverity Scan thinks complete_v1_state_transition smells

Andrew Cagney andrew.cagney at gmail.com
Mon Jun 4 14:11:33 UTC 2018


Fortunately, it is IKEv1.  Move along, nothing to see.

--

While both complete_v[12]_state_transition() implementations stink.
We don't need coverity to tell us that.  The good news is that we've
managed to compensate by accumulating reasonable test coverage.

On 3 June 2018 at 20:34, D. Hugh Redelmeier <hugh at mimosa.com> wrote:
> void complete_v1_state_transition(struct msg_digest **mdp, stf_status result)
> {
>         struct msg_digest *md = *mdp;
>         passert(md != NULL);
>
>         ...
>
>         switch (result) {
>         case STF_SUSPEND:
>                 set_cur_state(md->st);  /* might have changed */
>                 if (*mdp != NULL) {
>
> How could *mdp be NULL?
>
> (If I remember correctly, many years ago that could happen.  It was part
> of the signal from the state transition function to
> complete_v1_state_transition that md should not be freed.  But much
> has changed since then.)
>
> Andrew: the closest fingerprints are yours.  Can you have a look?
> _______________________________________________
> Swan-dev mailing list
> Swan-dev at lists.libreswan.org
> https://lists.libreswan.org/mailman/listinfo/swan-dev


More information about the Swan-dev mailing list