Changeset 325 for trunk/ext/php/phpext.c

Show
Ignore:
Timestamp:
07/22/2008 05:41:52 (4 months ago)
Author:
indeyets
Message:

fixed PECL-bug 14384 (tabs in YAML cause segfault)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ext/php/phpext.c

    r324 r325  
    609609        endl[0] = '\0'; 
    610610 
    611         exc = zend_throw_exception_ex(syck_exception_entry, 0 TSRMLS_CC, "%s on line %d, col %d: '%s'", str, p->linect + 1, p->cursor - p->lineptr, p->lineptr); 
    612  
    613         Z_SET_REFCOUNT_P(exc, 2); 
    614  
    615         st_foreach(p->syms, my_cleaner, NULL); 
    616  
    617         p->bonus = exc; 
     611        if (NULL == p->bonus) { 
     612                /* silence second exceptions */ 
     613                exc = zend_throw_exception_ex(syck_exception_entry, 0 TSRMLS_CC, "%s on line %d, col %d: '%s'", str, p->linect + 1, p->cursor - p->lineptr, p->lineptr); 
     614 
     615                Z_SET_REFCOUNT_P(exc, 2); 
     616 
     617                p->bonus = exc; 
     618        } 
     619 
     620        if (p->syms) 
     621                st_foreach(p->syms, my_cleaner, NULL); 
    618622} 
    619623