php.net |  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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: philip at qs dot co dot nz
New email:
PHP Version: OS:

 

 [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:
	efree(params);

Fix:
      check params not Null before calling efree().
       check line 713 also.
Note:
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.




Patches

Pull Requests

History

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC