Changeset 4635

Show
Ignore:
Timestamp:
11/12/08 09:27:48 (2 months ago)
Author:
martin
Message:

fixing keylength bug at the right place:

we usually don't touch output parameters if operations fails

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/charon/config/proposal.c

    r4634 r4635  
    211211{ 
    212212    enumerator_t *enumerator; 
    213     bool found
     213    bool found = FALSE
    214214     
    215215    enumerator = create_enumerator(this, type); 
     
    217217    { 
    218218        found = TRUE; 
    219     } 
    220     else 
    221     { 
    222         if (key_size) 
    223         { 
    224             *key_size = 0; 
    225         } 
    226         found = FALSE; 
    227219    } 
    228220    enumerator->destroy(enumerator); 
  • trunk/src/charon/sa/keymat.c

    r4531 r4635  
    358358                              chunk_t *encr_r, chunk_t *integ_r) 
    359359{ 
    360     u_int16_t enc_alg, int_alg, enc_size, int_size
     360    u_int16_t enc_alg, int_alg, enc_size = 0, int_size = 0
    361361    chunk_t seed, secret = chunk_empty; 
    362362    prf_plus_t *prf_plus;