diff --git a/xpcom/build/BinaryPath.h b/xpcom/build/BinaryPath.h index ef3d48f5c4c..264caa80c05 100644 --- a/xpcom/build/BinaryPath.h +++ b/xpcom/build/BinaryPath.h @@ -76,7 +76,7 @@ private: return NS_ERROR_FAILURE; snprintf(aResult, MAXPATHLEN, "%s/%s", greHome, "dummy"); - aResult[MAXPATHLEN] = '\0'; + aResult[MAXPATHLEN-1] = '\0'; return NS_OK; }