chiark / gitweb /
key.c: Split before storing a subkey.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 23 Jan 2012 03:06:49 +0000 (03:06 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 9 Jan 2013 04:06:32 +0000 (04:06 +0000)
Otherwise we might corrupt logically separate key data objects.  There's
an assertion to prevent this now.

I think the split method is now redundant.

key.c

diff --git a/key.c b/key.c
index cd330c7b076cc3826afb148196ab5a934d524a4f..19a57923403ed7f272dc7a0885fb527f4bf080b6 100644 (file)
--- a/key.c
+++ b/key.c
@@ -1097,6 +1097,7 @@ static int keydatastruct_pystore(PyObject *me,
 
   if ((tag = PyString_AsString(key)) == 0)
     goto end;
+  key_split(&KEYDATA_KD(me));
   if (value) {
     if (!KEYDATA_PYCHECK(value))
       TYERR("expected KeyData value");