Repository navigation
Fixed bug #44889 - #441
Closed
bwoebi wants to merge 1 commit into
Closed
Fixed bug #44889#441bwoebi wants to merge 1 commit into
bwoebi wants to merge 1 commit into
Conversation
Member
|
Why is this only done with short tags enabled? Furthermore, it looks to me like this may dereference the string pasts its end. |
Member
Author
|
@nikic There is some padding in yytext. So Hmm, I just see, that without short_open_tags the token is wrong without short_open_tags. Will fix. |
Member
Author
|
@nikic Used YYFILL to ensure that the buffer is always filled (= no segfault triggering dereference). Also with short_open_tag=Off it works now. |
Member
There was a problem hiding this comment.
char should be zend_bool here. The YYFILL has to come after the declaration to be C89 compatible.
(T_OPEN_TAG doesn't match <?php without any trailing characters with short_open_tags=On)
Member
|
Not reproductible on latest 5.5 nor 5.6. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes https://bugs.php.net/bug.php?id=44889
It's a simple check if it's the end of the input string and if the string is
<?php. And when yes, it extends theyylengto include the whole<?phpstring and movesYYCURSORbysizeof("php").