Thursday, November 13, 2025

Overflow

Overflow


In computing, a buffer is meant to be a place of order — a defined space, a promise of containment. Data comes in, it fits neatly, it moves on.  
When it works, it’s invisible.  

A buffer overflow happens when more data is written than the space was designed to hold. It’s a simple arithmetic mistake, yet it tells a deeper story: that expectations and reality have drifted apart. Somewhere, a promise was made that the system could handle it. It couldn’t.

The elegance of limits


Every buffer has boundaries. They aren’t failures of imagination; they’re expressions of discipline.  
Good code checks its inputs — not because it doubts the data, but because it respects the container.

The trouble begins when that respect erodes. A few extra bytes here, a little exception there — it all seems harmless. After all, the system hasn’t crashed yet. The logs are clean. Things appear to be running smoothly.

Until, suddenly, they aren’t.

Silent corruption


Overflows rarely announce themselves immediately. They don’t explode in a dramatic cascade of errors. Instead, they leak — a value overwritten here, a flag flipped there. Something subtle, deniable.  

By the time the failure becomes visible, the origin is hard to find. Everyone points somewhere else in the code. It’s difficult to assign blame when the system’s integrity has been quietly compromised over time.

Sometimes the corruption spreads. Adjacent structures — those meant to hold something entirely different — begin to behave strangely. Functions misfire. Memory turns unreliable. Trust becomes guesswork.

The illusion of capacity


Developers often overestimate how much a buffer can hold. Maybe they assume the input will stay small. Maybe they’ve handled bigger loads before and assume it’ll be fine again. Maybe the warnings were commented out long ago — "temporary," of course.  

But capacity isn’t about confidence. It’s about measurement, and respect for constraints that aren’t negotiable. Once a buffer starts stretching to accommodate everything asked of it, something essential has already gone wrong.

Defensive design


Resilient systems anticipate excess. They install boundaries not as barriers, but as protections for what’s inside.  
They check lengths before trusting input. They reject what doesn’t fit. They log, they pause, they push back.

The best code doesn’t aspire to handle *everything*. It knows what it’s for, and stops there.

Recovery


After an overflow, cleanup is difficult. You can patch the code, harden the interface, maybe even redesign the structure. But the memory once corrupted can leave traces — artifacts of what used to be reliable.  

Over time, systems that keep overflowing develop a kind of brittleness. Patches pile up. Documentation grows vague. No one remembers why certain limits exist, only that removing them “breaks something.”

Healthy systems are unglamorous. They validate, reject, and defer. They leave a little space unused — not wastefully, but wisely.

Epilogue


It’s easy to admire a program that takes on more than it was meant to, that runs hot and appears to handle it all.  
But real stability — the quiet kind — comes from knowing precisely where the edges are, and refusing to cross them.  

Because when a system fails, it’s rarely because it didn’t have enough capacity.  
It’s because it didn’t respect the capacity it already had.


From the Systems Desk

Author: Anonymous (but probably someone who's seen a few core dumps, both digital and otherwise).

Wednesday, November 5, 2025

Why quality matters over quantity when it comes to coding

Why quality matters over quantity when it comes to coding


When you create a piece of code, it's like a cookie cutter template. You can replicate the software very easily, but if there's an error in the template, the error propagates to every copy of the software.


You also end up with a bad reputation.


That's why when you create code, quality must come first. Quantity (lines of code, features, etc) come second, because it doesn't matter how many features or lines of code you have, if ONE single line of code has an error, that's a potential show-stopper.


Here's where DRUDGET'S cybersecurity software comes in. You might write sloppy C/C++ code where you don't check for buffer overflows. It doesn't matter, you pray the mitigations will catch it. It doesn't. Unless you use MMU (memory management unit) based mitigations. That's what DRUDGET's heap buffer overflow protector uses.


Again, DRUDGET's code wouldn't be necessary if you wrote perfect code the first time around. DRUDGET catches other things too: memory leaks, deadlocks, all caught and solved; garbage collection for memory leaks, and deadlock detector plus real-time deadlock workaround.


Unfortunately though, none of this is useful for "critical" applications that demand life-safety first: DRUDGET's software can only do so much. Embedded firmware running in some RTOS that is used in a medical device, or auto-pilot vehicle, needs to be written with QUALITY in mind.


That's why DRUDGET also has a source code auditing service. We audit your source code to ensure it complies with standards and use automated tools, that we crafted ourselves, as well as manual intervention, to secure your source code.


(As an example using our auditing tool, we found a flaw in Apache: CVE-2023-31122. https://ubuntu.com/security/CVE-2023-31122 - CVSS 3 Severity Score of 7.5 "high". I wanted to find a flaw in an open source application, and it took less than a minute to find it.)


So if you write C/C++ code, and your reputation is on the line, go visit DRUDGET (https://www.drudget.com.au) and send us your details. Our software makes QUALITY code easier to manufacture.




draichess geocities website mirror

Mirror here:  https://blog.davidshoon.org/draichess/ Username: open Password: sesame It's got some goodies from the naughties. Archive.o...