bugWeeChat - Bugs: bug #39261, Memory Overwriting

 
 

bug #39261: Memory Overwriting

Submitted by:  None
Submitted on:  Sun 16 Jun 2013 04:23:50 PM UTC  
 
Category: pluginsSeverity: 3 - Normal
Item Group: securityStatus: Invalid
Privacy: PublicAssigned to: Sebastien Helleu <flashcode>
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: 0.4.1
IRC nick: 

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 03 Jul 2013 08:20:23 AM UTC, comment #1:

I tested, it works fine for me, I have different name as prefix for option in plugins.conf:

Are you sure your two plugins have different name (when using macro WEECHAT_PLUGIN_NAME) ?
(anyway WeeChat should refuse to load two plugins with same name).

Sebastien Helleu <flashcode>
Project AdministratorIn charge of this item.
Sun 16 Jun 2013 04:23:50 PM UTC, original submission:

There is a Bug in the code for plugins.

Create two different plugins in C.
PluginA
PluginB

Both plugins at a certain point write to the configuration file plugins.conf.

PluginA:
weechat_config_set_plugin("optiona", "yes");
PluginB:
weechat_config_set_plugin("optionb", "no");

The settings in plugins.conf (or /set plugins.var.*) are:
plugins.var.PluginB.optiona = yes
plugins.var.PluginB.optionb = no

The second plugins loads and overwrites the name of the first!
The first plugin is unable to load its old settings. And it'll read (and write) from (to) the keys of the second plugin too.

If the options had the same name:
/plugin load PluginA
/plugin load PluginB
...sleep(1)...
weechat_config_set_plugin("option", "OK"); /* from PluginA */
weechat_config_set_plugin("option", "WRONG"); /* from PluginB */
the result of /set plugins.var.* is:
plugins.var.PluginB.option = "WRONG"

All options for "PluginA" are lost or overwritten. This may cause crashes if the names of the options of the two plugins are the same.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by flashcode (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 06 Oct 2013 07:39:53 AM UTCflashcodeOpen/ClosedOpen=>Closed
    Sat 20 Jul 2013 05:56:39 AM UTCflashcodeStatusWorks For Me=>Invalid
    Wed 03 Jul 2013 08:20:23 AM UTCflashcodeStatusNone=>Works For Me
      Assigned toNone=>flashcode

    Back to the top


    Powered by Savane 3.1-cleanup