php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62300 Wrong NULL checks
Submitted: 2012-06-12 13:00 UTC Modified: 2021-03-31 11:36 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: qiyuhua at 126 dot com Assigned:
Status: Suspended Package: InterBase related
PHP Version: 5.4.3 OS: ubuntu 10.04
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: qiyuhua at 126 dot com
New email:
PHP Version: OS:

 

 [2012-06-12 13:00 UTC] qiyuhua at 126 dot com
Description:
------------
As described in https://bugs.php.net/bug.php?id=54426, Wrong NULL checks was found. However, we find that the bug is not well repaired. And we can still reproduce the bug.
Removing the "continue" statement in the block of Null check code in ibase_query.c should be make everything work well:

Modified: php/php-src/trunk/ext/interbase/ibase_query.c
===================================================================
679c679
< 				continue;
---
> 				//continue;
===================================================================


Test script:
---------------
The two simple test scripts can be available at https://sourceforge.net/projects/wautorepair/files/test%20cases/
1)create a table like "createtable.php";
2)insert a NULL value like "huahua.php"

then, some errors will occur.


Patches

patch-for-wrong-null (last revision 2012-06-16 03:08 UTC by qiyuhua at 126 dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-12 23:23 UTC] felipe@php.net
Please, send a unified diff next time. Thanks.
 [2012-06-16 03:13 UTC] qiyuhua at 126 dot com
I have updated the patch file.
Test to reproduce the bug :
1.Create a table with not null field 
2.Add trigger filling this field before insert 
3.Try from PHP insert null value in the way of "ibase_query($dbh, "insert into hua values (3,?)",null)", which is the key for the reproduction. And if we insert null value in the way of "ibase_query($dbh, "insert into hua values (3,null)")", there is no error.
 [2014-04-08 11:50 UTC] mariuz@php.net
-Assigned To: +Assigned To: mariuz
 [2017-10-24 06:45 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: mariuz +Assigned To:
 [2021-03-31 11:36 UTC] cmb@php.net
-Status: Open +Status: Suspended
 [2021-03-31 11:36 UTC] cmb@php.net
The interbase extension is moved to PECL[1] as of PHP 7.4.0, and
is looking for a new maintainer.  Until a new maintainer is found,
I suspend this ticket.

Consider to use the bundled PDO_Firebird extension, or the
php-firebird package[2] instead.

[1] <https://pecl.php.net/package/interbase>
[2] <https://github.com/FirebirdSQL/php-firebird>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 03:01:28 2024 UTC