php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68692 explicit uninitalized pointer
Submitted: 2014-12-30 04:58 UTC Modified: 2015-01-08 15:45 UTC
From: bugreports at internot dot info Assigned:
Status: Closed Package: *General Issues
PHP Version: master-Git-2014-12-30 (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:

 

 [2014-12-30 04:58 UTC] bugreports at internot dot info
Description:
------------
Hi,

In /ext/standard/php_fopen_wrapper.c there is an uninitalized pointer read:

149        char *p, *token;
150        php_stream_filter *temp_filter;
151
152        p = php_strtok_r(filterlist, "|", &token);



Thanks,


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-12-31 18:42 UTC] php at mcq8 dot be
What is the problem exactly?
You just create a pointer that will be set by php_strtok_r.
There is no dereference of an uninitalized pointer.
 [2014-12-31 21:09 UTC] bugreports at internot dot info
php_strtok_r(char *s, const char *delim, char **last)
{   
    char *spanp;
    int c, sc;
    char *tok;

    if (s == NULL && (s = *last) == NULL)
    {
        return NULL;
    }

    /*
     * Skip (span) leading delimiters (s += strspn(s, delim), sort of).
     */
cont:
    c = *s++;



?
 [2015-01-08 08:38 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7ebdc8d70d7617f2c3353b027663ef54a24a2248
Log: Fixed #68692
 [2015-01-08 08:38 UTC] laruence@php.net
-Status: Open +Status: Closed
 [2015-01-08 15:45 UTC] bugreports at internot dot info
This is invalid.


This can only be triggered if 'stream' is NULL.

php_stream_apply_filter_list is never called if stream is NULL:

>                 if (!(stream = php_stream_open_wrapper(p + 10, mode, options, opened_path))) {
>                         efree(pathdup);
>                         return NULL;
>                 }
 [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=7ebdc8d70d7617f2c3353b027663ef54a24a2248
Log: Fixed #68692
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 08 06:01:28 2025 UTC