3 ms·
I thought I was gonna see an error because the stat'd file and the opened one didn't match. How disappointing
by oguz-ismail 2y ago
I thought I was gonna see an error because the stat'd file and the opened one didn't match. How disappointing
- IshKebab 2y agoNo, it just means you're checking the wrong file so you might not get the nice error message from the initial check. It's still not going to do anything incorrect when it comes to actually open the file though. TOCTOU only matters when the check is actually checking something important. Here it isn't; it's just giving nicer error messages. If you bypass it you just lose those nice error messages. So it isn't a problem here.