summaryrefslogtreecommitdiff
path: root/ext/com_dotnet/com_variant.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2006-11-13 15:33:26 +0000
committerIlia Alshanetsky <iliaa@php.net>2006-11-13 15:33:26 +0000
commit941c0362970acbcdf8ef02d260cc3d3b539ae31c (patch)
tree37929c01a8d312f4c6f12bfb91d5874d93094e43 /ext/com_dotnet/com_variant.c
parent682bbf19ef51fe3dab2eb892a3b95bbf2bdf9ab5 (diff)
downloadphp-git-941c0362970acbcdf8ef02d260cc3d3b539ae31c.tar.gz
Fixed bug #36644 (possible crash in variant_date_from_timestamp()).
Diffstat (limited to 'ext/com_dotnet/com_variant.c')
-rw-r--r--ext/com_dotnet/com_variant.c5
1 files changed, 5 insertions, 0 deletions
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(&timestamp);