1
0
Fork 0
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:
Jens Arnold 2004-11-10 22:20:20 +00:00
parent f497a56e1d
commit ca81ed218a

View file

@ -322,6 +322,9 @@ int plugin_load(const char* plugin, void* parameter)
splash(HZ*2, true, buf); splash(HZ*2, true, buf);
return fd; return fd;
} }
/* zero out plugin buffer to ensure a properly zeroed bss area */
memset(pluginbuf, 0, PLUGIN_BUFFER_SIZE);
plugin_start = (void*)&pluginbuf; plugin_start = (void*)&pluginbuf;
plugin_size = read(fd, plugin_start, PLUGIN_BUFFER_SIZE); plugin_size = read(fd, plugin_start, PLUGIN_BUFFER_SIZE);