diff options
author | Hartmut Holzgraefe <hholzgra@php.net> | 2003-04-11 04:41:52 +0000 |
---|---|---|
committer | Hartmut Holzgraefe <hholzgra@php.net> | 2003-04-11 04:41:52 +0000 |
commit | e06fdaae8b27e38b6d6eb54652f1b7c3904f3d98 (patch) | |
tree | fbecea7271bb743469f6ca479dce2fd155fef912 /ext/mysqli/mysqli_api.c | |
parent | a1ff81d27788ecbe2772b30349e1ee030ba57992 (diff) | |
download | php-git-e06fdaae8b27e38b6d6eb54652f1b7c3904f3d98.tar.gz |
accept possible leaks for now to make SELECTS with both bound parameters
and results again ...
Diffstat (limited to 'ext/mysqli/mysqli_api.c')
-rw-r--r-- | ext/mysqli/mysqli_api.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index af7d6d9c06..31f3deacdd 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -134,11 +134,16 @@ PHP_FUNCTION(mysqli_bind_param) /* prevent leak if variables are already bound */ +#if HHOLZGRA_0 + /* this would prevent using both bind_param and bind_result on SELECT + queries so it is disabled for now */ if (stmt->var_cnt) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Variables already bound"); efree(args); RETURN_FALSE; } +#endif + stmt->is_null = ecalloc(num_vars, sizeof(char)); bind = (MYSQL_BIND *)ecalloc(num_vars, sizeof(MYSQL_BIND)); @@ -265,11 +270,15 @@ PHP_FUNCTION(mysqli_bind_result) var_cnt = argc - start; /* prevent leak if variables are already bound */ +#if HHOLZGRA_0 + /* this would prevent using both bind_param and bind_result on SELECT + queries so it is disabled for now */ if (stmt->var_cnt) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Variables already bound"); efree(args); RETURN_FALSE; } +#endif bind = (MYSQL_BIND *)ecalloc(var_cnt, sizeof(MYSQL_BIND)); stmt->bind = (BIND_BUFFER *)ecalloc(var_cnt,sizeof(BIND_BUFFER)); |