"But it crashed. That's bad. I can't stop people scanning bad barcodes."
"But it crashed. That's bad. I can't stop people scanning bad barcodes."
Because if we just didn’t do that, then it would all work.
In particular, see folks talking about Self Driving hah.
Sad. What a poor understanding of our field.
The number one rule of them all is: "Never trust (user) input".
A slightly more powerful variation being: "assume all input is malicious until proven otherwise".
I mean: on one hand there are people who fuzz, who test, who think about edge cases, who think about security, who think about uptime, etc. And OTOH you have people saying "such input shouldn't happen". It's just really pathetic.
In computing, the robustness principle is a design guideline for software that states: "be conservative in what you do, be liberal in what you accept from others". It is often reworded as: "be conservative in what you send, be liberal in what you accept". The principle is also known as Postel's law, after Jon Postel, who used the wording in an early specification of TCP.
Also, that law gets quoted, and IMO is a rather large design mistake.
I was trying random barcodes I had lying around to test my own component. The one with the zero byte happened to be a large one they had added to my passport when I visited the USA. It had "US-VISIT" printed next to it in big letters.
The device was a rugged industrial handheld device with a screen and a camera, designed for mailrooms and warehouses. This was around 20 years ago and I remember the OS (including the barcode component) was completely bespoke and it ran without any process protections. This meant that the barcode would crash the whole device and you had to perform a hard reset.