Changeset 126475


Ignore:
Timestamp:
Oct 10, 2014, 11:06:53 PM (5 years ago)
Author:
cal@…
Message:

base: tracelib: don't crash on posix_spawn with NULL envp, #45318

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/darwintracelib1.0/proc.c

    r124145 r126475  
    149149        char **copyiter;
    150150
    151         while (*enviter != NULL) {
     151        while (enviter != NULL && *enviter != NULL) {
    152152                envlen++;
    153153                enviter++;
     
    160160        copyiter = copy;
    161161
    162         while (*enviter != NULL) {
     162        while (enviter != NULL && *enviter != NULL) {
    163163                char *val = *enviter;
    164164                if (__darwintrace_strbeginswith(val, "DYLD_INSERT_LIBRARIES=")) {
Note: See TracChangeset for help on using the changeset viewer.