forked from len0rd/rockbox
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
This commit is contained in:
parent
f497a56e1d
commit
ca81ed218a
1 changed files with 3 additions and 0 deletions
|
|
@ -323,6 +323,9 @@ int plugin_load(const char* plugin, void* parameter)
|
|||
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);
|
||||
close(fd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue