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
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: nayt at internayt dot com
New email:
PHP Version: OS:

 

 [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: Thu May 23 03:01:28 2024 UTC