src/keymanagement.c
changeset 191 3bb51ee8f90d
parent 130 507895068f83
child 214 79333debeee0
     1.1 --- a/src/keymanagement.c	Wed Apr 15 12:31:08 2015 +0200
     1.2 +++ b/src/keymanagement.c	Wed Apr 15 12:53:50 2015 +0200
     1.3 @@ -28,6 +28,9 @@
     1.4      assert(identity);
     1.5      assert(!EMPTY(identity->address));
     1.6  
     1.7 +    if (!(session && identity && !EMPTY(identity->address)))
     1.8 +        return PEP_ILLEGAL_VALUE;
     1.9 +
    1.10      status = get_identity(session, identity->address, &stored_identity);
    1.11      assert(status != PEP_OUT_OF_MEMORY);
    1.12      if (status == PEP_OUT_OF_MEMORY)
    1.13 @@ -190,6 +193,10 @@
    1.14      assert(identity->username);
    1.15      assert(identity->user_id);
    1.16  
    1.17 +    if (!(session && identity && identity->address && identity->username &&
    1.18 +                identity->user_id))
    1.19 +        return PEP_ILLEGAL_VALUE;
    1.20 +
    1.21      identity->comm_type = PEP_ct_pEp;
    1.22      identity->me = true;
    1.23