Bug #67134 [NEW]: missing null terminator for uniqueidentifier value
| From: | kaido at tradenet dot ee | Date: | Sat, 26 Apr 2014 08:56:43 +0000 |
| Subject: | Bug #67134 [NEW]: missing null terminator for uniqueidentifier value | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-185451@lists.php.net to get a copy of this message | ||
From: kaido at tradenet dot ee
Operating system: debian
PHP version: 5.4Git-2014-04-26 (Git)
Package: PDO DBlib
Bug Type: Bug
Bug description:missing null terminator for uniqueidentifier value
Description:
------------
PHP 5.4.29-dev (cli) (built: Apr 24 2014 16:49:28) (DEBUG)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
pdo_dblib does not set null terminator for returned uniqueidentifier
column
Test script:
---------------
<?php
$dsn = "dblib:host=xxx.xxx.xxx;dbname=xxx";
$pdo = new PDO($dsn, 'xxxx', 'xxxx');
$stmt = $pdo->query('select newid() ');
$res = $stmt->fetch();
var_dump($res);
unset ($stmt);
?>
Expected result:
----------------
array(2) {
[""]=>
string(36) "29E3B7BD-63DD-47C5-B58C-E41F12E4CAE3"
[0]=>
string(36) "29E3B7BD-63DD-47C5-B58C-E41F12E4CAE3"
}
Actual result:
--------------
array(2) {
[""]=>
string(36) "29E3B7BD-63DD-47C5-B58C-E41F12E4CAE3"
[0]=>
string(36) "29E3B7BD-63DD-47C5-B58C-E41F12E4CAE3"
}
Warning: String is not zero-terminated
(29E3B7BD-63DD-47C5-B58C-E41F12E4CAE3 ) (source:
/root/php/php-src/Zend/zend_execute_API.c:436) in Unknown on line 0
--
Edit bug report at https://bugs.php.net/bug.php?id=67134&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=67134&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=67134&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=67134&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=67134&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=67134&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=67134&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=67134&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=67134&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=67134&r=support
Expected behavior: https://bugs.php.net/fix.php?id=67134&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=67134&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=67134&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=67134&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=67134&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=67134&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=67134&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=67134&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=67134&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=67134&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=67134&r=mysqlcfg