Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
akira2501
2y ago
0 comments
Share
> or make assignments not be an expression,
Or just reverse the expression:
0 == curent->uid
So that the bug case is an error:
0 = current->uid
0 comments
default
newest
oldest
layer8
2y ago
Yes, that is well known, but it doesn’t prevent the issue in TFA.
akira2501
OP
2y ago
How does it not? Applied literally to the article, it would have turned this backdoor into a compile time error.
umanwizard
2y ago
Because you can’t trust the person backdooring your code to help you out by writing in this style.
1 more reply
j
/
k
navigate · click thread line to collapse