3 ms·
If I send that code "some some string" or "ssome string", it fails to respond with "other string" due to a bug. If I send it "sssome string", it does work. (dep
by sokoloff 10y ago
If I send that code "some some string" or "ssome string", it fails to respond with "other string" due to a bug. If I send it "sssome string", it does work. (depending on how you interpret the // before the else; if that comments out the else, then brute forcing the input by cycling all characters on the input will eventually cause output.)
So, there's a bug and now a maintainer has to go in and patch the bug, which may introduce a security flaw (either in the coding or the release deployment process).
You also have the exposure of whatever getInputChar() and output() do internally.
I'm not arguing there is an exploit just because of using Turing complete system, but observing that even simple systems tend to have bugs and get maintenance over time.
- drdeca 10y agoI did mean that as a comment, yes. I put that as a comment because in either of the other cases it already has a continue statement, so it wouldn't get to after the else comment unless the other conditions weren't met. Also, you are right that I made a mistake, in that I forgot to check if a wrong next character was a correct first character and similar problems. Oops! Ok. What I was trying to argue was that it is possible for a program in a Turing complete system to have no exploits, not that it is easy to write a program like that. I thought it was being claimed that it is completely impossible to write a program with no exploits for a Turing complete machine, and I was trying to argue against that.
- sokoloff 10y agoYou're right and you communicated that point well. I took the thread to a slight diversion given the premise that it's easy to write bugs in even short, simple code snippets, and that those bugs then introduce the requirement for maintenance, which brings in further opportunities for exploits to be introduced.