4 ms·
Oh yea, I was just thinking there are still limits to what 'safe' means though. My memory on the exact exploits was hazy so I had to look it up but I know it in
by hnick 6y ago
Oh yea, I was just thinking there are still limits to what 'safe' means though. My memory on the exact exploits was hazy so I had to look it up but I know it includes sending user defined data to the format string, which is not advised, but people do silly things all the time when coding which is why snprintf exists to start with. People can't be trusted to bounds check.
In my mind a safer version for daily use wouldn't support the more problematic format options but maybe other people use them far more widely than me.
- TazeTSchnitzel 6y agoRight, yeah, I should say snprintf() is safer than sprintf(), but it still has the unsafe features of printf().