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
 [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 Jun 24 13:01:26 2019 UTC