php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59001 Invalid syntax results in Segmentation fault
Submitted: 2009-12-21 23:33 UTC Modified: 2017-10-24 08:41 UTC
From: john dot dennis at ingres dot com Assigned:
Status: Suspended Package: ingres (PECL)
PHP Version: 5.1.2 OS: Linux
Private report: No CVE-ID: None
 [2009-12-21 23:33 UTC] john dot dennis at ingres dot com
Description:
------------
An attempt to execute a database procedure using the "standard" INGRES syntax of:
  EXECUTE PROCEDURE procname (p1='value',p2='value)
results in a Segmentation fault. It should generate an error if this is not supported syntax

Reproduce code:
---------------
DB Proc:
create procedure  dpr_client_incident_ins ( client_id
INTEGER4 NOT NULL WITH DEFAULT, kerberos_user_nm VARCHAR(8) NOT NULL
WITH DEFAULT, host_nm VARCHAR(15) NOT NULL WITH DEFAULT,
incident_type_cd VARCHAR(20) NOT NULL WITH DEFAULT, incident_dt DATE
NOT NULL WITH DEFAULT, action_ds VARCHAR(256) NOT NULL WITH DEFAULT,
create_user_id VARCHAR(32) NOT NULL WITH DEFAULT, create_dt DATE NOT
NULL WITH DEFAULT, update_user_id VARCHAR(32) NOT NULL WITH DEFAULT,
update_dt DATE NOT NULL WITH DEFAULT )AS DECLARE incident_id INTEGER4
NOT NULL WITH DEFAULT;

PHP Code:
$database="jrd";
$password='';
$conn=ingres_connect($database, 'ingres', $password);
$sql = "EXECUTE PROCEDURE dpr_client_incident_ins (
              client_id         = 24098,
              kerberos_user_nm  = 's123456',
              incident_type_cd  = 'Oneoff Processed',
              incident_dt       = date('now'),
              action_ds         = 'Broadhop provisioner added 350MB to s123456 on student internet service',
              create_user_id    = 'broadhop_provisioner',
              create_dt         = date('now'),
              update_user_id    = 'broadhop_provisioner',
              update_dt         = date('now'))";

echo "before ingres_query()\n";
$rc = ingres_query($conn,$sql);
echo "after ingres_query()\n";


Expected result:
----------------
An error should be returned, rather than a Segmentation fault

Actual result:
--------------
A4 140903 i920 > ./q.sh
before ingres_query()
Segmentation fault


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-24 08:41 UTC] kalle@php.net
-Status: Open +Status: Suspended
 [2017-10-24 08:41 UTC] kalle@php.net
The ingres package has not had any activity for 4 years, so its safe to say that its no longer in active development, if activity picks backup then the maintainer can re-open this report
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 20:01:29 2024 UTC