php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68840 Null pointer deference in PHP_INI_DISP(display_errors_mode)
Submitted: 2015-01-15 17:19 UTC Modified: 2015-01-19 04:37 UTC
From: bugreports at internot dot info Assigned: laruence (profile)
Status: Closed Package: *General Issues
PHP Version: master-Git-2015-01-15 (Git) OS: Linux Ubuntu 14.04
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bugreports at internot dot info
New email:
PHP Version: OS:

 

 [2015-01-15 17:19 UTC] bugreports at internot dot info
Description:
------------
Hi,

In /main/main.c:


381                tmp_value = (ini_entry->orig_value ? ini_entry->orig_value->val : NULL );
382                tmp_value_length = (int)ini_entry->orig_value->len;

That check on L381, "ini_entry->orig_value ? ini_entry->orig_value->val : NULL", implys that it ms possible for ini_entry->orig_value to be NULL.
However, the next line, it is dereferenced anyways.

Either the test is unneeded, or a test is needed for L382.


Thanks,


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-18 04:35 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=6a13e1f767288ad7944beb5e163d1621bd83617d
Log: Fixed bug #68840 (Null pointer deference)
 [2015-01-18 04:35 UTC] laruence@php.net
-Status: Open +Status: Closed
 [2015-01-19 04:36 UTC] stas@php.net
-Summary: Null pointer deference +Summary: Null pointer deference in PHP_INI_DISP(display_errors_mode) -Assigned To: +Assigned To: stas
 [2015-01-19 04:37 UTC] stas@php.net
-Assigned To: stas +Assigned To: laruence
 [2016-07-20 11:39 UTC] davey@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=6a13e1f767288ad7944beb5e163d1621bd83617d
Log: Fixed bug #68840 (Null pointer deference)
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 12:00:02 2026 UTC