Sscanf warning: String buffer overflow
#1

Let's suppose I have this:

pawn Код:
CMD:whisper(playerid, params[])
{
    new whisp[90];
    if(sscanf(params, "us[90]", giveplayerid, whisp)) return SendClientMessage //Blahblahblah whatever
    //Do something here
    return 1;
}
Well, it's a command. So, anybody can use it. Now, if the string text overpass the string size, the sscanf plugin prints this warning: sscanf warning: string buffer overflow.

Now, is there a way to avoid it BEFORE parsing the string with sscanf? Or is it normal to do this warning? I can see that sscanf cuts the string at the point, but are the warnings bad? Or can I just live with it?
Reply


Messages In This Thread
Sscanf warning: String buffer overflow - by hellangel - 19.12.2011, 01:33
Re: Sscanf warning: String buffer overflow - by Hoborific - 19.12.2011, 01:58
Re: Sscanf warning: String buffer overflow - by hellangel - 19.12.2011, 02:02
Re: Sscanf warning: String buffer overflow - by Scenario - 19.12.2011, 02:06
Re: Sscanf warning: String buffer overflow - by hellangel - 19.12.2011, 02:08
Re: Sscanf warning: String buffer overflow - by Scenario - 19.12.2011, 02:11
Re: Sscanf warning: String buffer overflow - by hellangel - 19.12.2011, 02:15
Re: Sscanf warning: String buffer overflow - by Scenario - 19.12.2011, 02:17
Re: Sscanf warning: String buffer overflow - by hellangel - 19.12.2011, 02:28
Re: Sscanf warning: String buffer overflow - by Calgon - 19.12.2011, 02:35

Forum Jump:


Users browsing this thread: 1 Guest(s)