[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Weechat-dev] [bug #39261] Memory Overwriting

From: anonymous
Subject: [Weechat-dev] [bug #39261] Memory Overwriting
Date: Sun, 16 Jun 2013 16:23:52 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20100101 Firefox/17.0


                 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: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 0.4.1
                IRC nick: 



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.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]