|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #176 seg fault with odbc_exec and null params
Submitted: 1998-03-15 00:06 UTC Modified: 1998-03-16 03:26 UTC
From: philip at qs dot co dot nz Assigned: kara (profile)
Status: Closed Package: ODBC related
PHP Version: 3.0b6 OS: Linix-ELF 2.0.30
Private report: No CVE-ID: None
 [1998-03-15 00:06 UTC] philip at qs dot co dot nz
Related to bug #12.

Using the following code with mysql-odbc driver and php:
  $params[]= "";
  $dbexec = odbc_prepare($dbcon,"use Non-existant-database"); 
  $dbexec = odbc_execute($dbexec,$params);
produces segfault in functions/unified_odbc.c line 700:

      check params not Null before calling efree().
       check line 713 also.
I am only using prepare/execute because the odbc_exec function
does not work with the mysql driver. I do not have any params to susbstitute in the call but
the function requires a parameter array to be passed.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1998-03-16 03:26 UTC] kara
The parameter array in odbc_execute() is optional. It is only used if your prepared
statement has placeholders.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Sep 27 17:01:24 2020 UTC