Bug #68881 [Opn->Fbk]: null pointer dereference / unused function
| From: | yohgaki@php.net | Date: | Thu, 22 Jan 2015 05:26:11 +0000 |
| Subject: | Bug #68881 [Opn->Fbk]: null pointer dereference / unused function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-190128@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68881&edit=1
ID: 68881
Updated by: yohgaki@php.net
Reported by: bugreports at internot dot info
Summary: null pointer dereference / unused function
-Status: Open
+Status: Feedback
Type: Bug
Package: Session related
Operating System: Linux Ubuntu 14.04
PHP Version: master-Git-2015-01-22 (Git)
-Assigned To:
+Assigned To: yohgaki
Block user comment: N
Private report: N
New Comment:
session_adapt_url() or php_url_scanner_adapt_single_url() is used for trans sid. i.e.
session.use_trans_sid = 1.
With a quick look, the buf could be NULL when there is no inputs. (This would only happens with
zend_smart_str, I suppose) I don't use trans sid at all. Could you make a simple reproducible
test script? Please don't forget to send your INI setting.
Previous Comments:
------------------------------------------------------------------------
[2015-01-22 04:04:02] bugreports at internot dot info
Description:
------------
Hi,
Is the session_adapt_url function ever used?
Or, php_url_scanner_adapt_single_url?
Inside php_url_scanner_adapt_single_url there is a null pointer dereference:
389 if (newlen) *newlen = buf.s->len;
390 result = estrndup(buf.s->val, buf.s->len);
but it is initalized with {0}.
The function isn't used anywhere, though.
Should it be removed?
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68881&edit=1