From: Ilia Alshanetsky Date: Mon, 13 Nov 2006 15:33:40 +0000 (+0000) Subject: MFB: Fixed bug #36644 (possible crash in variant_date_from_timestamp()). X-Git-Tag: RELEASE_1_0_0RC1~1029 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=79a3667ef3898c8484fa769639d9f56f6757ab62;p=php MFB: Fixed bug #36644 (possible crash in variant_date_from_timestamp()). --- diff --git a/ext/com_dotnet/com_variant.c b/ext/com_dotnet/com_variant.c index 07dc98d3c7..620ff3fa88 100644 --- a/ext/com_dotnet/com_variant.c +++ b/ext/com_dotnet/com_variant.c @@ -806,6 +806,11 @@ PHP_FUNCTION(variant_date_from_timestamp) return; } + if (timestamp < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Timestamp value must be a positive value."); + RETURN_FALSE; + } + VariantInit(&res); tzset(); ttstamp = timestamp;