Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      GitHub’s CEO Thomas Dohmke steps down, triggering tighter integration of company within Microsoft

      August 12, 2025

      bitHuman launches SDK for creating AI avatars

      August 12, 2025

      Designing With AI, Not Around It: Practical Advanced Techniques For Product Design Use Cases

      August 11, 2025

      Why Companies Are Investing in AI-Powered React.js Development Services in 2025

      August 11, 2025

      I found a Google Maps alternative that won’t track you or drain your battery – and it’s free

      August 12, 2025

      I tested this new AI podcast tool to see if it can beat NotebookLM – here’s how it did

      August 12, 2025

      Microsoft’s new update makes your taskbar a productivity hub – here’s how

      August 12, 2025

      Save $50 on the OnePlus Pad 3 plus get a free gift – here’s the deal

      August 12, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      Laravel Global Scopes: Automatic Query Filtering

      August 12, 2025
      Recent

      Laravel Global Scopes: Automatic Query Filtering

      August 12, 2025

      Building MCP Servers in PHP

      August 12, 2025

      Filament v4 is Stable!

      August 12, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      I Asked OpenAI’s New Open-Source AI Model to Complete a Children’s School Test — Is It Smarter Than a 10-Year-Old?

      August 12, 2025
      Recent

      I Asked OpenAI’s New Open-Source AI Model to Complete a Children’s School Test — Is It Smarter Than a 10-Year-Old?

      August 12, 2025

      Madden NFL 26 Leads This Week’s Xbox Drops—But Don’t Miss These Hidden Gems

      August 12, 2025

      ASUS G14 Bulked Up for 2025—Still Sexy, Just a Bit Chonkier

      August 12, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»News & Updates»CodeSOD: Classic WTF: When it’s OK to GOTO

    CodeSOD: Classic WTF: When it’s OK to GOTO

    June 25, 2025

    Where did you GOTO on your vacation? Nowhere. GOTO is considered harmful. Original —Remy

    Everybody knows that you should never use “goto” statements. Well, except in one or two rare circumstances that you won’t come across anyway. But even when you do come across those situations, they’re usually “mirage cases” where there’s no need to “goto” anyway. Kinda like today’s example, written by Jonathan Rockway’s colleague. Of course, the irony here is that the author likely tried to use “continue” as his label, but was forced to abbreviate it to “cont” in order to skirt compiler “reserved words” errors.

    while( sysmgr->getProcessCount() != 0 )
    {
      // Yes, I realize "goto" statements are considered harmful,
      // but this is a case where it is OK to use them
      cont:
    
      //inactivation is not guaranteed and may take up to 3 calls
      sysmgr->CurrentProcess()->TryInactivate();
      
      if( sysmgr->CurrentProcess()->IsActive() )
      {
        Sleep(DEFAULT_TIMEOUT);
        goto cont;
      }
    
      /* ED: Snip */
    
      //disconnect child processes
      if( sysmgr->CurrentProcess()->HasChildProcesses() )
      {
        /* ED: Snip */
      }
    
      /* ED: Snip */
       
      if( sysmgr->CurrentProcess()->IsReusable() )
      {
        sysmgr->ReuseCurrentProcess();
        goto cont;
      }  
    
      sysmgr->CloseCurrentProcess();
    
    }
    [Advertisement]
    ProGet’s got you covered with security and access controls on your NuGet feeds. Learn more.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleRogue WordPress Plugin Unmasked: Stealthy Malware Skims Credit Cards & Steals Credentials
    Next Article CVE-2025-5585 – SiteOrigin Widgets Bundle Stored Cross-Site Scripting Vulnerability

    Related Posts

    News & Updates

    I found a Google Maps alternative that won’t track you or drain your battery – and it’s free

    August 12, 2025
    News & Updates

    I tested this new AI podcast tool to see if it can beat NotebookLM – here’s how it did

    August 12, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    CVE-2025-6710 – MongoDB Server JSON Parsing Stack Overflow Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    38,000+ FreeDrain Subdomains Found Exploiting SEO to Steal Crypto Wallet Seed Phrases

    Development

    HP’s premium RTX 4060 OLED gaming laptop is way cheaper than the competition with this $470 discount

    News & Updates

    CVE-2025-5963 – Postbox macOS Dylib Injection Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    CVE-2025-7455 – Campcodes Online Movie Theater Seat Reservation System SQL Injection Vulnerability

    July 11, 2025

    CVE ID : CVE-2025-7455

    Published : July 11, 2025, 8:15 p.m. | 50 minutes ago

    Description : A vulnerability classified as critical was found in Campcodes Online Movie Theater Seat Reservation System 1.0. Affected by this vulnerability is an unknown functionality of the file /manage_reserve.php. The manipulation of the argument mid leads to sql injection. The attack can be launched remotely. The exploit has been disclosed to the public and may be used.

    Severity: 7.3 | HIGH

    Visit the link for more details, such as CVSS details, affected products, timeline, and more…

    Life in Startup Pivot Hell with Ex-Microsoft Lonewolf Engineer Sam Crombie [Podcast #171]

    May 9, 2025

    CVE-2024-52279 – Apache Zeppelin JDBC URL Validation Bypass

    August 3, 2025

    element

    April 7, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.