key/key-data.c (key_copydata): Fix catastrophic bug.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 21 Nov 2019 17:43:51 +0000 (17:43 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 16 Dec 2019 16:25:17 +0000 (16:25 +0000)
commitb1182cd3f0e7369aec459444949ee504929e89c4
tree63154a5bf38b1d53a238c0e316bb8a3c8e5987f2
parentc0b59f7d9f30feb99accce942889110ec8f601c7
key/key-data.c (key_copydata): Fix catastrophic bug.

The fundamental problem is that the key-encoding test has the wrong
sense.  The result is that we end up (only) trying to iterate over non-
structured keys, which results in an assertion failure.

Also, switch things around so that we check the encoding type before
checking the flags.
key/key-data.c