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:  plugins Severity:  3 - Normal
Item Group:  security Status:  Invalid
Privacy:  Public Assigned to:  Sebastien Helleu <flashcode>
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  0.4.1
IRC nick: 

Add a New Comment(Rich 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.

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

weechat_config_set_plugin("optiona", "yes");
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
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.



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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


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

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

    Only logged-in users can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-10-06 flashcode Open/ClosedOpen => Closed
    2013-07-20 flashcode StatusWorks For Me => Invalid
    2013-07-03 flashcode StatusNone => Works For Me
        Assigned toNone => flashcode

    Back to the top

    Powered by Savane 3.3