Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not allow using traits/interfaces/abstract classes as stream wrappers
- Loading branch information
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--TEST-- | ||
Bug#74951 Null pointer dereference in user streams | ||
--FILE-- | ||
<?php | ||
trait Stream00ploiter{ | ||
public function s() {} | ||
public function n($_) {} | ||
} | ||
stream_wrapper_register('e0ploit','Stream00ploiter'); | ||
$s=fopen('e0ploit://',0); | ||
--EXPECTF-- | ||
Warning: fopen(e0ploit://): failed to open stream: operation failed in %s/bug74951.php on line 7 |
This file contains 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