From 97b0b87f7a908750763a4a357be15dc42f8f8cd3 Mon Sep 17 00:00:00 2001 From: ZiRee Date: Thu, 28 Jul 2022 16:15:35 +0000 Subject: Creating an LLVector4 from LLColor3 causes an array out of bounds read on reading .mV[3]. Doing a detour via LLVector3 fixes this but maybe there is a less roundabout way. --- indra/newview/llsettingsvo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llsettingsvo.cpp') diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp index 7c762170a7..707b602fc6 100644 --- a/indra/newview/llsettingsvo.cpp +++ b/indra/newview/llsettingsvo.cpp @@ -694,8 +694,8 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force) LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); - LLVector4 sunDiffuse = LLVector4(psky->getSunlightColor().mV); - LLVector4 moonDiffuse = LLVector4(psky->getMoonlightColor().mV); + LLVector4 sunDiffuse = LLVector4(LLVector3(psky->getSunlightColor().mV)); + LLVector4 moonDiffuse = LLVector4(LLVector3(psky->getMoonlightColor().mV)); shader->uniform4fv(LLShaderMgr::SUNLIGHT_COLOR, sunDiffuse); shader->uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, moonDiffuse); -- cgit v1.2.3