From caadb7fa2752b1ded24ad074afb4f56ee1b85bf2 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 7 Sep 2009 21:29:18 -0700 Subject: [PATCH] Fixed invalid array access in PluginSys (bug 3933, r=pred). --- core/PluginSys.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/PluginSys.cpp b/core/PluginSys.cpp index 453cae09..e60cc97a 100644 --- a/core/PluginSys.cpp +++ b/core/PluginSys.cpp @@ -59,7 +59,7 @@ CPlugin::CPlugin(const char *file) m_bSilentlyFailed = false; m_serial = ++MySerial; m_pRuntime = NULL; - m_errormsg[256] = '\0'; + m_errormsg[sizeof(m_errormsg) - 1] = '\0'; snprintf(m_filename, sizeof(m_filename), "%s", file); m_handle = 0; m_ident = NULL;