php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68705 Dangling Pointer
Submitted: 2014-12-31 10:42 UTC Modified: 2015-01-18 04:22 UTC
From: bugreports at internot dot info Assigned:
Status: No Feedback Package: *General Issues
PHP Version: master-Git-2014-12-31 (Git) OS: Linux Ubuntu 14.04
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-12-31 10:42 UTC] bugreports at internot dot info
Description:
------------
Hi,

In /ext/fileinfo/libmagic/softmagic.c there is a dangling pointer / pointer to local outside scope:


2158                                                pattern_offset = &offsetcopy;
2159                                        } ZEND_HASH_FOREACH_END();
[..]
2163                                        if ((pattern_match != NULL) && (pattern_offset != NULL)) {
2164                                                ms->search.s += Z_LVAL_P(pattern_offset); /* this is where the match starts */
2165                                                ms->search.offset += Z_LVAL_P(pattern_offset); /* this is where the match starts as size_t */
2166                                                ms->search.rm_len = Z_STRLEN_P(pattern_match) /* This is the length of the matched pattern */;


Thanks,


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-08 08:23 UTC] laruence@php.net
hmm, I am not sure, maybe you mis-read it? 
offsetcopy is defined at 2129, in the same block with 2165
 [2015-01-08 08:45 UTC] laruence@php.net
-Status: Open +Status: Feedback
 [2015-01-18 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 06:01:35 2024 UTC