diff options
author | Ulf Wendel <uw@php.net> | 2009-09-11 12:16:56 +0000 |
---|---|---|
committer | Ulf Wendel <uw@php.net> | 2009-09-11 12:16:56 +0000 |
commit | 9af451ff4948bf3561716eeca670d345b6bc235b (patch) | |
tree | 09dd1c165e0f3f15a80c7b04be50b592c5cdfc8d /ext/mysqli/mysqli_api.c | |
parent | 384c7bce5a0c91109a50e3ae614759800fc658e9 (diff) | |
download | php-git-9af451ff4948bf3561716eeca670d345b6bc235b.tar.gz |
Fixing a crash which must have existed since PHP 5.0. At least the crash can be reproduced with PHP 5.0.6. The crash happens only when using the MySQL Client Library (libmysql) - it does not happen
when using mysqlnd.
Diffstat (limited to 'ext/mysqli/mysqli_api.c')
-rw-r--r-- | ext/mysqli/mysqli_api.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 93f5aaad13..f69f6e7634 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -409,7 +409,7 @@ mysqli_stmt_bind_result_do_bind(MY_STMT *stmt, zval ***args, unsigned int argc, bind[ofs].buffer = stmt->result.buf[ofs].val; bind[ofs].is_null = &stmt->result.is_null[ofs]; bind[ofs].buffer_length = stmt->result.buf[ofs].buflen; - bind[ofs].length = &stmt->result.buf[ofs].buflen; + bind[ofs].length = &stmt->result.buf[ofs].output_len; break; } default: @@ -955,7 +955,7 @@ void mysqli_stmt_fetch_libmysql(INTERNAL_FUNCTION_PARAMETERS) } else #endif { - copy_len = stmt->result.buf[i].buflen; + copy_len = stmt->result.buf[i].output_len; } if (!IS_BINARY_DATA(fields[i])) { ZVAL_UTF8_STRINGL(stmt->result.vars[i], stmt->result.buf[i].val, |