3 ms·
Eh, there's like six separate issues that led to this. 1. Interface accepted blank value for a form when a numeric value is required. 2. Application and datab
by da_chicken 5y ago
Eh, there's like six separate issues that led to this.
1. Interface accepted blank value for a form when a numeric value is required.
2. Application and database permitted a null or coerced a zero when the value is required and cannot be zero. You've got to sanitize your input.
3. Application did not check for or gracefully handle something as common as a division by zero exception. Instead it proceeded to a buffer overrun and crashed.
4. Application crashing apparently caused an OS crash? Yes, okay, it's NT 4.0 and a buffer overrun, but that still should not happen. Protected mode is a thing.
5. There is no redundancy in a system that manages the steering, weapons, and engines of a warship.
6. A warship was unable to restore the single CNC system to working order for 23 hours.
Furthermore... there's no evidence that the software would have behaved more sensibly or more controllably if it had a value of infinity instead of an error. It shouldn't have had a zero in the first place.