php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54426 Wrong NULL checks
Submitted: 2011-03-30 18:46 UTC Modified: 2011-07-19 16:26 UTC
Votes:3
Avg. Score:4.3 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:1 (33.3%)
From: jiri at cincura dot net Assigned: mariuz (profile)
Status: Closed Package: InterBase related
PHP Version: 5.3.6 OS: All
Private report: No CVE-ID: None
 [2011-03-30 18:46 UTC] jiri at cincura dot net
Description:
------------
ibase_query.c contains on line 676 checks for NULL. But this is wrong, as the value could be provided in trigger etc.

Simply removing this check should be enough and everything will be working fine.


Patches

QuickAndDirtyPatch (last revision 2011-03-30 19:00 UTC by mapopa at gmail dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-14 12:32 UTC] mapopa at gmail dot com
Here is the patch 
http://paste.ubuntu.com/593941/

in case the one bellow doesn't download
I will create one for 5.3.x trunk branch
 [2011-05-06 14:44 UTC] mapopa at gmail dot com
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. 


Current version(s) are failing.
 [2011-05-29 18:49 UTC] felipe@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: mariuz
 [2011-07-19 16:26 UTC] mariuz@php.net
-Status: Assigned +Status: Closed
 [2011-07-19 16:26 UTC] mariuz@php.net
patch commited in svn for 5.3,5.4 and trunk branches
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Oct 04 21:01:27 2024 UTC