php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78473 odbc_close() closes arbitrary resources
Submitted: 2019-08-28 15:44 UTC Modified: 2019-08-28 15:45 UTC
From: cmb@php.net Assigned: cmb (profile)
Status: Closed Package: ODBC related
PHP Version: 7.2Git-2019-08-28 (Git) OS: *
Private report: No CVE-ID: None
 [2019-08-28 15:44 UTC] cmb@php.net
Description:
------------
While odbc_close() warns if a resource which is not an odbc link
or an odbc link persistent resource is passed, it still goes on to
close the resource.

Test script:
---------------
<?php

odbc_close(STDIN);
var_dump(STDIN);

Expected result:
----------------
Warning: odbc_close(): supplied resource is not a valid ODBC-Link resource in %s on line 3
bool(false)
resource(1) of type (stream)

Actual result:
--------------
Warning: odbc_close(): supplied resource is not a valid ODBC-Link resource in $s on line 3
NULL
resource(1) of type (Unknown)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-08-28 15:45 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2019-08-28 16:11 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=b5572658166c4b8cbc1d332877a7a84c6e18a1c1
Log: Fix #78473: odbc_close() closes arbitrary resources
 [2019-08-28 16:11 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 08:01:29 2024 UTC