diff options
-rw-r--r-- | apps/plugin.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index 276bf1b078..1db0253c4e 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -577,7 +577,8 @@ int plugin_load(const char* plugin, void* parameter) | |||
577 | plugin_size = hdr->end_addr - pluginbuf; | 577 | plugin_size = hdr->end_addr - pluginbuf; |
578 | 578 | ||
579 | /* zero out bss area only, above guards end of pluginbuf */ | 579 | /* zero out bss area only, above guards end of pluginbuf */ |
580 | memset(pluginbuf + readsize, 0, plugin_size - readsize); | 580 | if (plugin_size > readsize) |
581 | memset(pluginbuf + readsize, 0, plugin_size - readsize); | ||
581 | #endif | 582 | #endif |
582 | 583 | ||
583 | plugin_loaded = true; | 584 | plugin_loaded = true; |