php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64611 Segfault using ODBC with SQL Server "Native Client"
Submitted: 2013-04-08 14:54 UTC Modified: 2013-04-09 02:56 UTC
From: brandonkirsch at gmail dot com Assigned:
Status: Duplicate Package: ODBC related
PHP Version: 5.5.0beta1 OS: Linux - OpenSuse 12.2 64-bit
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: brandonkirsch at gmail dot com
New email:
PHP Version: OS:

 

 [2013-04-08 14:54 UTC] brandonkirsch at gmail dot com
Description:
------------
A segfault has existed in PHP since at least 5.2.17 when using ODBC with SQL Server Native Client driver.

Selecting NULL values in a computed expression causes the segfault.

I created a patch for this over a year ago and submitted the pull request here: https://github.com/php/php-src/pull/193

The pull request has not been accepted, so the segfault still exists even in 5.5.0beta2.



Test script:
---------------
<?php

$conn = odbc_connect('Driver=SQL Server Native Client 11.0;server=xxx;uid=xxx;pwd=xxx;Database=xxx','','');

$query = odbc_exec($conn, 'select null');

$segfault = odbc_fetch_array($query); // segfault



Expected result:
----------------
odbc_fetch_array to return a result rather than segfault.

Actual result:
--------------
segfault.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-04-09 02:56 UTC] laruence@php.net
dup to #61387
 [2013-04-09 02:56 UTC] laruence@php.net
-Status: Open +Status: Duplicate
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 09:01:27 2024 UTC