3 ms·
Neither of the individual facts is surprising. It is the juxtaposition that is. In 20 years of writing C/C++ code, I had never thought of #including files such
by puzzledobserver 7y ago
Neither of the individual facts is surprising. It is the juxtaposition that is. In 20 years of writing C/C++ code, I had never thought of #including files such as /dev/stdin.
Of course, I know how the #include mechanism works, and what the special device files do, so I can anticipate the results of #include </dev/stdin>, but it is unusual enough that I had to write a small test program to see for myself.
- commandersaki 7y agoI’ve known about it for a very long time after someone pointed it out. I always joke that’s how I write C. I never thought about it in terms of a security problem.