Bug #68705 [Opn]: Dangling Pointer
| From: | laruence@php.net | Date: | Thu, 08 Jan 2015 08:23:10 +0000 |
| Subject: | Bug #68705 [Opn]: Dangling Pointer | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-189733@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68705&edit=1
ID: 68705
Updated by: laruence@php.net
Reported by: bugreports at internot dot info
Summary: Dangling Pointer
Status: Open
Type: Bug
Package: *General Issues
Operating System: Linux Ubuntu 14.04
PHP Version: master-Git-2014-12-31 (Git)
Block user comment: N
Private report: N
New Comment:
hmm, I am not sure, maybe you mis-read it?
offsetcopy is defined at 2129, in the same block with 2165
Previous Comments:
------------------------------------------------------------------------
[2014-12-31 10:42:30] 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,
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68705&edit=1