3 ms·
> 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
by akira2501 3y ago
> 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
- layer8 3y agoYes, that is well known, but it doesn’t prevent the issue in TFA.
- akira2501 3y agoHow does it not? Applied literally to the article, it would have turned this backdoor into a compile time error.
- School-Cotton 3y agoBecause you can’t trust the person backdooring your code to help you out by writing in this style.
- akira2501 3y agoYes, they could literally violate the coding style, but presumably, that would draw more attention to what they've done, not less.