Projects
Browse Source     Search     Timeline     Wiki

Changeset 23381

Show
Ignore:
Timestamp:
09/13/07 12:11:36 (15 months ago)
Author:
zarzycki@…
Message:

Better input vetting.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/launchd/src/launchd_core_logic.c

    r23380 r23381  
    16881688 
    16891689        if (pload == NULL) { 
     1690                errno = EINVAL; 
    16901691                return NULL; 
    16911692        } 
     
    16961697        } 
    16971698 
    1698         if ((tmp = launch_data_dict_lookup(pload, LAUNCH_JOBKEY_LABEL)) && 
    1699                         (launch_data_get_type(tmp) == LAUNCH_DATA_STRING)) { 
    1700                 if (!(label = launch_data_get_string(tmp))) { 
    1701                         errno = EINVAL; 
    1702                         return NULL; 
    1703                 } 
     1699        if (!(tmp = launch_data_dict_lookup(pload, LAUNCH_JOBKEY_LABEL))) { 
     1700                errno = EINVAL; 
     1701                return NULL; 
     1702        } 
     1703 
     1704        if (launch_data_get_type(tmp) != LAUNCH_DATA_STRING) { 
     1705                errno = EINVAL; 
     1706                return NULL; 
     1707        } 
     1708 
     1709        if (!(label = launch_data_get_string(tmp))) { 
     1710                errno = EINVAL; 
     1711                return NULL; 
    17041712        } 
    17051713