summaryrefslogtreecommitdiff
path: root/apps/plugin.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2004-11-10 22:20:20 +0000
committerJens Arnold <amiconn@rockbox.org>2004-11-10 22:20:20 +0000
commitca81ed218ad891a87ec5849d062a9cb10f983c22 (patch)
treeb571d493d1abca870ecb673fd5a4b0964cddb121 /apps/plugin.c
parentf497a56e1dadbb9259e1f0c447b430114fb36445 (diff)
Zero out plugin RAM before loading a plugin, to ensure a properly zeroed bss area. This matters because gcc puts zero-initialized data into bss
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5396 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.c')
-rw-r--r--apps/plugin.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index ae698c3432..c1796ac1d2 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -322,6 +322,9 @@ int plugin_load(const char* plugin, void* parameter)
splash(HZ*2, true, buf);
return fd;
}
+
+ /* zero out plugin buffer to ensure a properly zeroed bss area */
+ memset(pluginbuf, 0, PLUGIN_BUFFER_SIZE);
plugin_start = (void*)&pluginbuf;
plugin_size = read(fd, plugin_start, PLUGIN_BUFFER_SIZE);