URL:
  <http://savannah.nongnu.org/bugs/?39261>

                 Summary: Memory Overwriting
                 Project: WeeChat
            Submitted by: None
            Submitted on: Sun 16 Jun 2013 04:23:50 PM UTC
                Category: plugins
                Severity: 3 - Normal
              Item Group: security
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: [email protected]
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 0.4.1
                IRC nick: 

    _______________________________________________________

Details:

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.






    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?39261>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/weechat-dev

Reply via email to