3 ms·
The article gives very dangerous advice, especially for networking code. Padding will not be overwritten and when transmitting the struct (provided there is no
by HorstG 7y ago
The article gives very dangerous advice, especially for networking code. Padding will not be overwritten and when transmitting the struct (provided there is no attribute packed or the compiler ignores it) information will leak.
Yes, someone will point out that there are languages that do not have such problems. However, when still using C, one has to be extremely careful...
- saagarjha 7y agoI am reasonably certain that any code that happens to transmit padding bytes (or observe them in any way) is abusing at the very least implementation-defined behavior.