Re: [PECL-DEV] Re: [PDO] Breaking the PDO API
[email protected] (Matteo Beccati) Thu, 16 Apr 2009 01:47:40 +0200
| Newsgroups | php.pecl.dev,php.pdo |
|---|---|
| Message-ID | <[email protected]> |
Wez Furlong ha scritto: > I found the patch... can you explain the nature of the crash and which > driver(s) it affects? > Your patch is huge, and it seems to me that the right fix is to prevent > drivers from returning empty strings when the expectation is a LOB; > either return NULL or make a LOB with no content. The pgsql driver is surely affected. The oci driver might be affected, although I don't have enough experience with it to verify. From what I can see the problem is that the get_col API can set value either to a (php_stream *) or a (char *). The check on value[0] was added to fix http://bugs.php.net/bug.php?id=46274, to prevent the stream related code to be run when an empty string is returned by the driver. As you've already seen my proposal was to an is_stream parameter to the get_col API to make sure PDO knows what it's expected to handle. Cheers -- Matteo Beccati OpenX - http://www.openx.org