sscanf string buffer overflow
#1

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?
Reply
#2

Use a one-size-fits-all string or check the length beforehand.
Reply
#3

yes you can use strlen
if(strlen(params) >= sizeof(string) || sscanf( ... ) )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)