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
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
20 + 21 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 17:01:29 2024 UTC