From 39e571c8d84467a54c357549e35227d87980c440 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 11 Jan 2016 09:46:53 +0100 Subject: further datatype and range check fixes for ibase --- ext/interbase/php_ibase_udf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/interbase/php_ibase_udf.c') diff --git a/ext/interbase/php_ibase_udf.c b/ext/interbase/php_ibase_udf.c index 7102c17c56..e3fe6e7edc 100644 --- a/ext/interbase/php_ibase_udf.c +++ b/ext/interbase/php_ibase_udf.c @@ -250,8 +250,8 @@ static void call_php(char *name, PARAMDSC *r, int argc, PARAMDSC **argv) case dtype_int64: l = *(ISC_INT64*)argv[i]->dsc_address; - if (argv[i]->dsc_scale == 0 && l <= LONG_MAX && l >= LONG_MIN) { - ZVAL_LONG(&args[i], (long)l); + if (argv[i]->dsc_scale == 0 && l <= ZEND_LONG_MAX && l >= ZEND_LONG_MIN) { + ZVAL_LONG(&args[i], (zend_long)l); } else { ZVAL_DOUBLE(&args[i], ((double)l)/scales[-argv[i]->dsc_scale]); } @@ -309,8 +309,8 @@ static void call_php(char *name, PARAMDSC *r, int argc, PARAMDSC **argv) case IS_LONG: r->dsc_dtype = dtype_long; - *(long*)r->dsc_address = Z_LVAL(return_value); - r->dsc_length = sizeof(long); + *(zend_long*)r->dsc_address = Z_LVAL(return_value); + r->dsc_length = sizeof(zend_long); break; case IS_DOUBLE: -- cgit v1.2.1