php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57559 Segmentation fault within get_record()
Submitted: 2007-03-03 11:34 UTC Modified: 2017-04-01 21:09 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: john dot navratil at sbcglobal dot net Assigned:
Status: Wont fix Package: Paradox (PECL)
PHP Version: 5.1.6 OS: Fedora Core 5
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: john dot navratil at sbcglobal dot net
New email:
PHP Version: OS:

 

 [2007-03-03 11:34 UTC] john dot navratil at sbcglobal dot net
Description:
------------
Script to open and read a paradox DB file generates a segmentation fault when attempting to read a record.  This appears to be related to some object initialization as I am able to successfully process this file using other scripts, quite easily.  In fact, it was a bit of a challenge to preserve the error as I was stripping the script for a manageable example.

At some point in my experimentation, I received the message "PHP Fatal error:  paradox_db::get_record(): Could not fseek start of first data block.", but was unable to reproduce that error.  It may be a clue.

In the code, below, the error appears if the (stripped) paradoxOpen2() function is used, but does not if the in-line open code is used.

I could provide you with the 'STOCKLOT.DB' file, but observed this error on each of three files I have.

Reproduce code:
---------------
function paradoxOpen2($file, $ioMode)
{
	$fp = fopen($file, $ioMode);
	$pxdoc = new paradox_db();
	$pxdoc->open_fp($fp);
	return $pxdoc;
}

$pxdoc = paradoxOpen2('STOCKLOT.DB', "r"); // Generates segmentation fault

//	$fp = fopen('STOCKLOT.DB', "r"); // Does not generate segmentation fault
//	$pxdoc = new paradox_db();
//	$pxdoc->open_fp($fp);

$arr = $pxdoc->get_record(1);


Expected result:
----------------
(nothing)

Actual result:
--------------
segmentation fault

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-03 11:37 UTC] john dot navratil at sbcglobal dot net
(Corrected bug summary text)
 [2017-04-01 21:09 UTC] tpunt@php.net
-Status: Open +Status: Wont fix
 [2017-04-01 21:09 UTC] tpunt@php.net
Due to this extension not seeing any activity since 2007, this issue will not be fixed. We are therefore closing this now.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 10:01:22 2019 UTC