if (strlen(filename) != filename_len) {
return;
}
- if (memcmp(filename, ":memory:", sizeof(":memory:")) != 0) {
+ if (filename_len != sizeof(":memory:")-1 ||
+ memcmp(filename, ":memory:", sizeof(":memory:")-1) != 0) {
- if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) {
- zend_throw_exception(zend_exception_get_default(TSRMLS_C), "Unable to expand filepath", 0 TSRMLS_CC);
+ if (!(fullpath = expand_filepath(filename, NULL))) {
+ zend_throw_exception(zend_ce_exception, "Unable to expand filepath", 0);
return;
}