Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
akira2501
2y ago
0 comments
Save
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
3 comments · 1 top-level
top
newest
oldest
layer8
2y ago
· 2 in thread
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