php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13464 PHP crashes when string not closed in a switch statement
Submitted: 2001-09-26 21:50 UTC Modified: 2001-09-27 02:48 UTC
From: nayt at internayt dot com Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.0.4pl1 OS: Windows 2000 Pro
Private report: No CVE-ID: None
 [2001-09-26 21:50 UTC] nayt at internayt dot com
When a string statement is not closed correctly in a case statement, the php engine crashes and causes a windows error. Example of the bad code:

        switch ($oRow["imageAlignment"]) {
            case 1:
                $sOutput = "<br>\n" .
                           "$sImageOutput<br>\n" .
                           "$mainContent<br>\n" .
                           break;
            case 2:
                $sOutput = "<br>\n" .
                           "$mainContent<br>\n" .
                           "$sImageOutput<br>\n";
                           break;
        }

Fixing the case 1 statement to terminate the string will fix the crashing error.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-27 02:48 UTC] mfischer@php.net
Cannot reproduce with 4.0.6 and latest CVS.

- Markus
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 24 15:01:29 2024 UTC