Bug #54169 [Asn]: Garbage Pointers returned for (n)varchar(max) columns (SQL Server)
| From: | cmb@php.net | Date: | Thu, 28 Jul 2016 15:35:34 +0000 |
| Subject: | Bug #54169 [Asn]: Garbage Pointers returned for (n)varchar(max) columns (SQL Server) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-202677@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=54169&edit=1
ID: 54169
Updated by: cmb@php.net
Reported by: auroraeosrose@php.net
Summary: Garbage Pointers returned for (n)varchar(max)
columns (SQL Server)
Status: Assigned
Type: Bug
Package: PDO ODBC
Operating System: Any
PHP Version: Irrelevant
Assigned To: auroraeosrose
Block user comment: N
Private report: N
New Comment:
> The fix works.
According to dpayne it doesn't, see
<https://github.com/php/php-src/pull/348#issuecomment-19565798>.
Previous Comments:
------------------------------------------------------------------------
[2016-04-07 03:44:07] jlongo at kastle dot com
no issues with the patch. Apparently PHP is happy to keep security vulnerabilities in multiple
versions of their code base for years on end after a patch is submitted. someone who is an official
php developer is gonna have to kick this.
we have pulled the patch in and have applied it to our builds of PHP that we use with no issue
except that it requires extra effort to do a custom patch and compile of source.
------------------------------------------------------------------------
[2016-04-07 02:49:32] calioptrix at gmail dot com
I just spent three hours chasing down this bug. I'm using php 5.6.0 with sql server 2014. Does
the proposed patch have issues?
As a band-aid, I got around the issue by casting to a varchar of length 8000, the maximum length of
a "regular" varchar. In this particular case, truncating the field won't be an issue.
SELECT CAST(ColumnName AS VARCHAR(8000)) AS ColumnFixed FROM Table
------------------------------------------------------------------------
[2015-12-30 16:53:48] robshelby at icloud dot com
It would be great if this was merged into PHP 5.6 as well.
------------------------------------------------------------------------
[2015-12-17 20:15:33] deankearney at gmail dot com
This bug still exists in php7. The fix works. Can we get this merged in?
------------------------------------------------------------------------
[2015-06-05 17:56:20] cmb@php.net
Related To: Bug #44278
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=54169
--
Edit this bug report at https://bugs.php.net/bug.php?id=54169&edit=1