php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #146 using exit() in eval() causes crash
Submitted: 1998-03-04 18:50 UTC Modified: 1998-03-13 06:22 UTC
From: tomo at arts dot box dot co dot jp Assigned: zeev (profile)
Status: Closed Package: Reproducible Crash
PHP Version: 3.0 Latest CVS OS: FreeBSD 2.2-stable
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tomo at arts dot box dot co dot jp
New email:
PHP Version: OS:

 

 [1998-03-04 18:50 UTC] tomo at arts dot box dot co dot jp
A following script causes segment violation:

<?php
  eval( "echo('hello'); exit();" );
?>

It seems that the FILE* variable passes as NULL in main.c:
...
   if ( GLOBAL(initialized) & INIT_SCANNER) {
       reset_scanner();
       fclose(GLOBAL(phpin)); /*** here! ***/
       GLOBAL(initialized) &= ~INIT_SCANNER;
   }

# I am running the CGI version.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-03-13 06:22 UTC] zeev
Fixed
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Dec 16 08:01:27 2019 UTC