diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2006-11-13 15:33:26 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2006-11-13 15:33:26 +0000 |
| commit | 941c0362970acbcdf8ef02d260cc3d3b539ae31c (patch) | |
| tree | 37929c01a8d312f4c6f12bfb91d5874d93094e43 /ext/com_dotnet/com_variant.c | |
| parent | 682bbf19ef51fe3dab2eb892a3b95bbf2bdf9ab5 (diff) | |
| download | php-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.c | 5 |
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(×tamp); |
