From 941c0362970acbcdf8ef02d260cc3d3b539ae31c Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Mon, 13 Nov 2006 15:33:26 +0000 Subject: Fixed bug #36644 (possible crash in variant_date_from_timestamp()). --- ext/com_dotnet/com_variant.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ext/com_dotnet/com_variant.c') diff --git a/ext/com_dotnet/com_variant.c b/ext/com_dotnet/com_variant.c index ae350fe1d8..d45c094a70 100644 --- a/ext/com_dotnet/com_variant.c +++ b/ext/com_dotnet/com_variant.c @@ -798,6 +798,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(); tmv = localtime(×tamp); -- cgit v1.2.1