In modern code we'd want to do a threat model that considered the consequences of untrusted inputs.
763 karma · joined February 14, 2011
In modern code we'd want to do a threat model that considered the consequences of untrusted inputs.
You're probably thinking in C# or Java; remember that in C the convention is that a zero char ends strings. If the source string is shorter than the query string then the code will encounter a zero char in the source string at the same time as it encounters a non-zero char in the query string, and the inequality will end the loop before the beyond-bounds dereference.
There are other defects; can you find them?
I will definitely try to remember that for next year!
I'm curious to know if you knew from the moment of your birth that you should look at the operator table in this case, or if you learned that mitigation on a particular day. If the latter, what might you have done before you learned that?
That said, the C# compiler team was and continues to be extremely concerned about breaking changes because we very clearly perceived the cost to customers and the barriers to upgrading entailed by breaking changes. I introduced a handful of deliberate breaking changes in my years on the C# design and compiler team, and every one was agonized over for many hours by members of the design team who were experts on the likely customer impacts.
Sure, there are plenty of ways to mitigate the problem. That's not the point. The point is that the problem should not have arisen in the first place to require ongoing mitigation fifty years later!
It was astonishing because of what the lawyers said: yes, it is a public relations risk to have ordinary employees communicating directly with the developer community, and we are willing to take on that risk if it dramatically improves our satisfaction metrics in the developer community.
We were basically told "don't be stupid, don't share corporate secrets, comport yourselves professionally, keep it on-topic, and if there are legal problems, legal will handle them appropriately".
I don't know that things would be the same today; it was a different time. But I'd hope so.
That said, lots of times Microsoft's left hand does not know what the right hand is doing.
I still edit my friend's programming books, but I sure don't do it for the money.
This is part three of a very long series that will explore the connections between LINQ, probability distributions, and the difficulties of sampling from arbitrary distributions.
I've had candidates with PhDs in computer science who thought that pointers on 64 bit operating systems were two bytes wide. Do they believe that there are only 16000 possible allocations before the allocator fails? Not likely, because that's ridiculous. So how could they have that belief? because they understand so little about pointers that they don't understand the implications of their false beliefs.
I need someone who is going to command the salary that a PhD-level candidate will demand to be able to hit the ground running.