Bug #62300 [Opn->Sus]: Wrong NULL checks

From: Date: Wed, 31 Mar 2021 11:36:42 +0000
Subject: Bug #62300 [Opn->Sus]: Wrong NULL checks
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-233088@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62300&edit=1 ID: 62300 Updated by: cmb@php.net Reported by: qiyuhua at 126 dot com Summary: Wrong NULL checks -Status: Open +Status: Suspended Type: Bug Package: InterBase related Operating System: ubuntu 10.04 PHP Version: 5.4.3 Block user comment: N Private report: N New Comment: 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> Previous Comments: ------------------------------------------------------------------------ [2012-06-16 03:13:51] 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. ------------------------------------------------------------------------ [2012-06-12 23:23:26] felipe@php.net Please, send a unified diff next time. Thanks. ------------------------------------------------------------------------ [2012-06-12 13:00:42] 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. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62300&edit=1

« previous php.bugs (#233088) next »