sscanf string buffer overflow - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: sscanf string buffer overflow (
/showthread.php?tid=585711)
sscanf string buffer overflow -
PaulDinam - 15.08.2015
Is it really bad if someone types in a longer string than their supposed to and that warning appears? Is there a way to prevent this?
Re: sscanf string buffer overflow -
Vince - 15.08.2015
Use a one-size-fits-all string or check the length beforehand.
Re: sscanf string buffer overflow -
Jefff - 15.08.2015
yes you can use strlen
if(strlen(params) >= sizeof(string) || sscanf( ... ) )