php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68741 Null pointer dereference
Submitted: 2015-01-04 12:16 UTC Modified: 2015-03-23 01:21 UTC
From: bugreports at internot dot info Assigned: laruence (profile)
Status: Closed Package: *Database Functions
PHP Version: master-Git-2015-01-04 (Git) OS: Linux Ubuntu 14.04
Private report: No CVE-ID: 2015-1352
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
38 - 3 = ?
Subscribe to this entry?

 
 [2015-01-04 12:16 UTC] bugreports at internot dot info
Description:
------------
Hi,

In /ext/pgsql/pgsql.c:

6447        token = php_strtok_r(table_copy, ".", &tmp);
6448        len = strlen(token);

'token' may return NULL, leading to a null pointer deference.

Elsewhere, the result of php_strtok_r() is checked against NULL, and should be here too.

A quick look shows that this may be reproducable by running
pg_insert() with a NULL table-name.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-08 08:09 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=124fb22a13fafa3648e4e15b4f207c7096d8155e
Log: Fixed bug #68739 #68740 #68741
 [2015-01-08 08:15 UTC] laruence@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: laruence
 [2015-01-08 08:15 UTC] laruence@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2015-03-18 12:44 UTC] kaplan@php.net
-CVE-ID: +CVE-ID: 2015-1352
 [2015-03-23 01:21 UTC] stas@php.net
-Summary: Null pointer deference +Summary: Null pointer dereference
 [2015-03-23 01:33 UTC] stas@php.net
Automatic comment on behalf of stas
Revision: http://git.php.net/?p=php-src.git;a=commit;h=968fbc6acf0bc27be17c0209be7f966e89a55943
Log: Bacport fix bug #68741 - Null pointer dereference
 [2016-07-20 11:40 UTC] davey@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=124fb22a13fafa3648e4e15b4f207c7096d8155e
Log: Fixed bug #68739 #68740 #68741
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 18:01:28 2024 UTC