Changeset 206 in openpam


Ignore:
Timestamp:
May 1, 2003, 5:57:17 PM (11 years ago)
Author:
des
Message:

Variable initialization issues.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/pam_set_item.c

    r200 r206  
    3232 * SUCH DAMAGE. 
    3333 * 
    34  * $P4: //depot/projects/openpam/lib/pam_set_item.c#17 $ 
     34 * $P4: //depot/projects/openpam/lib/pam_set_item.c#18 $ 
    3535 */ 
    3636 
     
    6363                RETURNC(PAM_SYSTEM_ERR); 
    6464        slot = &pamh->item[item_type]; 
     65        osize = nsize = 0; 
    6566        switch (item_type) { 
    6667        case PAM_SERVICE: 
     
    7475        case PAM_AUTHTOK_PROMPT: 
    7576        case PAM_OLDAUTHTOK_PROMPT: 
     77                if (*slot != NULL) 
     78                        osize = strlen(*slot) + 1; 
    7679                if (item != NULL) 
    7780                        nsize = strlen(item) + 1; 
    78                 if (*slot != NULL) 
    79                         osize = strlen(*slot) + 1; 
    8081                break; 
    8182        case PAM_REPOSITORY: 
Note: See TracChangeset for help on using the changeset viewer.