diff options
author | Jens Arnold <amiconn@rockbox.org> | 2004-11-10 22:20:20 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2004-11-10 22:20:20 +0000 |
commit | ca81ed218ad891a87ec5849d062a9cb10f983c22 (patch) | |
tree | b571d493d1abca870ecb673fd5a4b0964cddb121 /apps/plugin.c | |
parent | f497a56e1dadbb9259e1f0c447b430114fb36445 (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.c | 3 |
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); |