From: Dmitry Stogov Date: Mon, 29 Aug 2005 06:51:51 +0000 (+0000) Subject: Fixed SIGSEGV X-Git-Tag: PRE_NEW_OCI8_EXTENSION~73 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7999c0c3d46fc64dd85f0600d8fe450b9bdf7a37;p=php Fixed SIGSEGV --- diff --git a/main/main.c b/main/main.c index 6bc2a45f96..0fa9fc0946 100644 --- a/main/main.c +++ b/main/main.c @@ -572,7 +572,7 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c stage = "PHP Shutdown"; } else { function = get_active_function_name(TSRMLS_C); - if (function && !USTR_LEN(function)) { + if (!function || !USTR_LEN(function)) { stage = "Unknown"; function = NULL; } @@ -582,7 +582,7 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c if (function) { spprintf(&origin, 0, "%v%s%v(%s)", class_name, space, function, params); } else { - spprintf(&origin, 0, "%v", stage); + spprintf(&origin, 0, "%s", stage); } /* origin and buffer available, so lets come up with the error message */