What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » Bug in plugin support?

Bug in plugin support?
Author: Message:
Finn
Junior Member
**


Posts: 41
– / Male / –
Joined: Jul 2003
O.P. Bug in plugin support?
was trying to fix the bug with the colour fade plugin crashing msn plus and it doesnt seem to be related to the colour fade plugin


the following code causes the crash and given the docs should be perfectly fine, this a bug in msn plus ?



if(stricmp(sCommand, "/xcopy") == 0)
{
strncpy(sResult, sCommandArg, 1500);
return TRUE;
}

it crashes if you do /xcopy blahblahblahblah.. (for as many as you can do) and it cant have spaces in the blahblahblah etc

This post was edited on 07-08-2003 at 07:42 PM by Finn.
07-08-2003 07:40 PM
Profile PM Find Quote Report
allex87
Junior Member
**

Avatar
Hmmm...

Posts: 99
36 / Male / –
Joined: Jul 2003
RE: Bug in plugin support?
maybe because if the message length is longer than 1100 (i think thats maximum), the program will crash...but.. to work around it, just set a strlen if...

size_t len;
len = strlen(sCommandArg);
if (len < 1094)
{
   //do whatever you want
}
else
{
  MessageBox(NULL, "Maximum message length exceeded!", "WARNING!", MB_OK);
}

If u do the math (and i hope i did it correctly.. :P).. considering the message length should not exceed 1100 chars... the /xcopy command has 6 characters +1 space, so 7 (no null). Next, your full message can only be 1001(with null) - 7 = 1094... ;)
[Image: signature.gif]
07-08-2003 08:43 PM
Profile E-Mail PM Web Find Quote Report
Finn
Junior Member
**


Posts: 41
– / Male / –
Joined: Jul 2003
O.P. RE: Bug in plugin support?
the docs say you can output 2048 though even if only 1100 can be sent
07-08-2003 09:43 PM
Profile PM Find Quote Report
Patchou
Messenger Plus! Creator
*****

Avatar

Posts: 8607
Reputation: 201
43 / Male / Flag
Joined: Apr 2002
RE: Bug in plugin support?
Thanks for the bug report but I'm not sure to understand what the problem is. Please pos the code of the whole function that causes Plus! to crash and I'll fix the problem :).

Note: please make sure you upgraded to version 2.20.48 first.
Patchou
[Image: signature2.gif]
07-08-2003 11:55 PM
Profile PM Web Find Quote Report
Finn
Junior Member
**


Posts: 41
– / Male / –
Joined: Jul 2003
O.P. RE: Bug in plugin support?
Sorry if i wasnt too clear

the full function :-

MPPLUGIN_RETURN_BOOL ParseCommand(/*[in]*/  const char* sCommand,
                                  /*[in]*/  const char* sCommandArg,
                                  /*[in]*/  PLUGIN_PARAM* pParam,
                                  /*[out]*/ char* sResult)
{
if(stricmp(sCommand, "/xcopy") == 0)
{
strncpy(sResult, sCommandArg, 1500);
return TRUE;
}
return FALSE;
}


now if you open a chat window and do /xcopy blahblahblahblahblahblahblah.. (until you cant type anymore and with no spaces) msn plus will crash

HTH
07-09-2003 07:10 AM
Profile PM Find Quote Report
Bamboe
Junior Member
**

Avatar

Posts: 30
Joined: Feb 2003
RE: Bug in plugin support?
why don't you do this?

if(stricmp(sCommand, "/xcopy") == 0 && strlen(sCommandArg) < 500 (or whatever the maximum is))
07-09-2003 11:55 AM
Profile E-Mail PM Find Quote Report
Whacko
Full Member
***

Avatar

Posts: 209
Reputation: 1
40 / Male / –
Joined: Apr 2002
RE: Bug in plugin support?
The xfade plugin is probably causing this.... as it uses 2 characters before each letter to change the letter's color so each letter takes 3 places. resulting in 3300 characters outputed by the plugin, if the text you typed was 1100. which Messenger wont like very much :P
I code in:
C
C++
Delphi
Visual Basic
Pascal :P
07-09-2003 12:09 PM
Profile PM Web Find Quote Report
Finn
Junior Member
**


Posts: 41
– / Male / –
Joined: Jul 2003
O.P. RE: Bug in plugin support?
err no, its got nothing to do with that, msn plus doesnt seem to like getting a large chunk of characters without spaces placed in sResult, i tried with as few as 500 characters and it still crashed
07-09-2003 05:24 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On