Bug #68705 [Fbk->NoF]: Dangling Pointer

From: Date: Sun, 18 Jan 2015 04:22:30 +0000
Subject: Bug #68705 [Fbk->NoF]: Dangling Pointer
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-190027@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:       php-bugs@lists.php.net
 Reported by:      bugreports at internot dot info
 Summary:          Dangling Pointer
-Status:           Feedback
+Status:           No Feedback
 Type:             Bug
 Package:          *General Issues
 Operating System: Linux Ubuntu 14.04
 PHP Version:      master-Git-2014-12-31 (Git)
 Private report:   N

 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------
[2015-01-08 08:23:10] laruence@php.net

hmm, I am not sure, maybe you mis-read it? 
offsetcopy is defined at 2129, in the same block with 2165

------------------------------------------------------------------------
[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


Thread (4 messages)

« previous php.bugs (#190027) next »