diff --git a/shell/source/backends/localebe/localebackend.cxx b/shell/source/backends/localebe/localebackend.cxx index 32ab8e63c2bb..d51571071ab4 100644 --- a/shell/source/backends/localebe/localebackend.cxx +++ b/shell/source/backends/localebe/localebackend.cxx @@ -19,6 +19,7 @@ #include +#include #include #include "localebackend.hxx" @@ -194,6 +195,7 @@ static css::beans::Optional ImplGetLocale(char const * category) return {false, {}}; } } + assert(cp >= locale); if (cp - locale > std::numeric_limits::max()) { SAL_INFO("shell", "locale env var content too long"); return {false, {}};