diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index fd0e8208c..121268ad6 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -60,7 +60,6 @@ set(llcommon_SOURCE_FILES
llformat.cpp
llframetimer.cpp
llheartbeat.cpp
- llindraconfigfile.cpp
llinitparam.cpp
llinstancetracker.cpp
llliveappconfig.cpp
@@ -186,7 +185,6 @@ set(llcommon_HEADER_FILES
llheartbeat.h
llhttpstatuscodes.h
llindexedqueue.h
- llindraconfigfile.h
llinitparam.h
llinstancetracker.h
llkeythrottle.h
diff --git a/indra/llcommon/llindraconfigfile.cpp b/indra/llcommon/llindraconfigfile.cpp
deleted file mode 100644
index f0873450f..000000000
--- a/indra/llcommon/llindraconfigfile.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * @file llindraconfigfile.cpp
- *
- *
- * This class is an LLLiveFile that has config info for indra
- * Currently only whether it's blacklisted
- *
- * $LicenseInfo:firstyear=2007&license=viewergpl$
- *
- * Copyright (c) 2007-2009, Linden Research, Inc.
- *
- * Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab. Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
- *
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
- *
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- *
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- * $/LicenseInfo$
- */
-
-#include "llindraconfigfile.h"
-
-#include "llfile.h"
-#include "llsd.h"
-#include "llsdserialize.h"
-#include "llframetimer.h"
-
-static std::string sConfigDir = "";
-static const char indraConfigFileName[] = "indra.xml";
-
-
-LLIndraConfigFile::LLIndraConfigFile()
- : LLLiveFile(filename()),
- mConfig(LLSD())
-{
-}
-
-//static
-void LLIndraConfigFile::initClass(const std::string& config_dir)
-{
- sConfigDir = config_dir;
- llinfos << "LLIndraConfigFile::initClass config dir "
- << config_dir << "/" << indraConfigFileName << llendl;
-}
-
-LLSD LLIndraConfigFile::getConfig(const std::string& config_name)
-{
- if (sConfigDir.empty())
- {
- llerrs << "LLIndraConfigFile::initClass() not called" << llendl;
- }
-
- LLFrameTimer::updateFrameTime();
-
- static LLIndraConfigFile the_file;
- the_file.checkAndReload();
-
- return the_file.mConfig[config_name];
-}
-
-std::string LLIndraConfigFile::filename()
-{
- std::ostringstream ostr;
-
- ostr << sConfigDir
- << "/" << indraConfigFileName;
-
- return ostr.str();
-}
-
-/* virtual */
-bool LLIndraConfigFile::loadFile()
-{
- llinfos << "LLIndraConfigFile::loadFile: reading from "
- << filename() << llendl;
-
- LLSD config;
-
- {
- llifstream file(filename());
- if (file.is_open())
- {
- LLSDSerialize::fromXML(config, file);
- }
-
- if (config.isUndefined())
- {
- llinfos << "LLIndraConfigFile::loadFile: file missing, ill-formed,"
- " or simply undefined; not changing the blacklist" << llendl;
- return false;
- }
- }
-
- if (config.isMap())
- {
- mConfig = config;
- return true;
- }
- else
- {
- llwarns << "LLIndraConfigFile: " << indraConfigFileName << " expects a map; wrong format" << llendl;
- return false;
- }
-}
diff --git a/indra/llcommon/llindraconfigfile.h b/indra/llcommon/llindraconfigfile.h
deleted file mode 100644
index 17eda906e..000000000
--- a/indra/llcommon/llindraconfigfile.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * @file llindraconfigfile.h
- * @brief manages configuration file for indra.xml
- *
- * $LicenseInfo:firstyear=2007&license=viewergpl$
- *
- * Copyright (c) 2007-2009, Linden Research, Inc.
- *
- * Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab. Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
- *
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
- *
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- *
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLINDRACONFIGFILE_H
-#define LL_LLINDRACONFIGFILE_H
-
-#include "linden_common.h"
-#include
-
-#include "lllivefile.h"
-#include "llsd.h"
-
-
-// To use, call LLIndraConfigFile::initClass(config_dir);
-// Then whenever getConfig is called, it will check and reload automatically
-
-class LLIndraConfigFile : public LLLiveFile
-{
-public:
- LLIndraConfigFile();
- static void initClass(const std::string& config_dir);
- static LLSD getConfig(const std::string& config_name);
-
-private:
- static std::string filename();
-
-protected:
- /* virtual */ bool loadFile();
- LLSD mConfig;
-};
-
-#endif //LL_LLINDRACONFIGFILE_H
diff --git a/indra/llmessage/aihttptimeoutpolicy.cpp b/indra/llmessage/aihttptimeoutpolicy.cpp
index 019750efc..b9052f12f 100644
--- a/indra/llmessage/aihttptimeoutpolicy.cpp
+++ b/indra/llmessage/aihttptimeoutpolicy.cpp
@@ -965,7 +965,6 @@ P(newAgentInventoryVariablePriceResponder);
P(objectCostResponder);
P(objectLinksetsResponder);
P(physicsFlagsResponder);
-P(placeAvatarTeleportResponder);
P(productInfoRequestResponder);
P(regionResponder);
P(remoteParcelRequestResponder);
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index 7312209da..b722660bf 100644
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -168,6 +168,7 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector& fa
if ( !get_dom_sources(inputs, pos_offset, tc_offset, norm_offset, idx_stride, pos_source, tc_source, norm_source) || !pos_source )
{
+ llwarns << "Could not find dom sources for basic geo data; invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
@@ -188,27 +189,78 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector& fa
LLVolumeFace::VertexMapData::PointMap point_map;
- for (U32 i = 0; i < idx.getCount(); i += idx_stride)
+ U32 index_count = idx.getCount();
+ U32 vertex_count = pos_source ? v.getCount() : 0;
+ U32 tc_count = tc_source ? tc.getCount() : 0;
+ U32 norm_count = norm_source ? n.getCount() : 0;
+
+ for (U32 i = 0; i < index_count; i += idx_stride)
{
LLVolumeFace::VertexData cv;
if (pos_source)
{
+ // guard against model data specifiying out of range indices or verts
+ //
+ if (((i + pos_offset) > index_count)
+ || ((idx[i+pos_offset]*3+2) > vertex_count))
+ {
+ llwarns << "Out of range index data; invalid model." << llendl;
+ return LLModel::BAD_ELEMENT;
+ }
+
cv.setPosition(LLVector4a(v[idx[i+pos_offset]*3+0],
v[idx[i+pos_offset]*3+1],
v[idx[i+pos_offset]*3+2]));
+
+ if (!cv.getPosition().isFinite3())
+ {
+ llwarns << "Nan positional data, invalid model." << llendl;
+ return LLModel::BAD_ELEMENT;
+ }
}
if (tc_source)
{
+ // guard against model data specifiying out of range indices or tcs
+ //
+
+ if (((i + tc_offset) > index_count)
+ || ((idx[i+tc_offset]*2+1) > tc_count))
+ {
+ llwarns << "Out of range TC indices." << llendl;
+ return LLModel::BAD_ELEMENT;
+ }
+
cv.mTexCoord.setVec(tc[idx[i+tc_offset]*2+0],
tc[idx[i+tc_offset]*2+1]);
+
+ if (!cv.mTexCoord.isFinite())
+ {
+ llwarns << "Found NaN while loading tex coords from DAE-Model, invalid model." << llendl;
+ return LLModel::BAD_ELEMENT;
+ }
}
if (norm_source)
{
+ // guard against model data specifiying out of range indices or norms
+ //
+ if (((i + norm_offset) > index_count)
+ || ((idx[i+norm_offset]*3+2) > norm_count))
+ {
+ llwarns << "Found out of range norm indices, invalid model." << llendl;
+ return LLModel::BAD_ELEMENT;
+ }
+
cv.setNormal(LLVector4a(n[idx[i+norm_offset]*3+0],
n[idx[i+norm_offset]*3+1],
n[idx[i+norm_offset]*3+2]));
+
+ if (!cv.getNormal().isFinite3())
+ {
+ llwarns << "Found NaN while loading normals from DAE-Model, invalid model." << llendl;
+ return LLModel::BAD_ELEMENT;
+ }
}
BOOL found = FALSE;
@@ -263,7 +315,7 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector& fa
LLVolumeFace& new_face = *face_list.rbegin();
if (!norm_source)
{
- //l_aligned_free_16(new_face.mNormals);
+ //ll_aligned_free_16(new_face.mNormals);
new_face.mNormals = NULL;
}
@@ -335,6 +387,7 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector& fac
if (!get_dom_sources(inputs, pos_offset, tc_offset, norm_offset, idx_stride, pos_source, tc_source, norm_source))
{
+ llwarns << "Could not get DOM sources for basic geo data, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
@@ -366,6 +419,11 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector& fac
LLVolumeFace::VertexMapData::PointMap point_map;
+ U32 index_count = idx.getCount();
+ U32 vertex_count = pos_source ? v.getCount() : 0;
+ U32 tc_count = tc_source ? tc.getCount() : 0;
+ U32 norm_count = norm_source ? n.getCount() : 0;
+
U32 cur_idx = 0;
for (U32 i = 0; i < vcount.getCount(); ++i)
{ //for each polygon
@@ -378,22 +436,68 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector& fac
if (pos_source)
{
+ // guard against model data specifiying out of range indices or verts
+ //
+ if (((cur_idx + pos_offset) > index_count)
+ || ((idx[cur_idx+pos_offset]*3+2) > vertex_count))
+ {
+ llwarns << "Out of range position indices, invalid model." << llendl;
+ return LLModel::BAD_ELEMENT;
+ }
+
cv.getPosition().set(v[idx[cur_idx+pos_offset]*3+0],
v[idx[cur_idx+pos_offset]*3+1],
v[idx[cur_idx+pos_offset]*3+2]);
+
+ if (!cv.getPosition().isFinite3())
+ {
+ llwarns << "Found NaN while loading positions from DAE-Model, invalid model." << llendl;
+ return LLModel::BAD_ELEMENT;
+ }
+
}
if (tc_source)
{
+ // guard against model data specifiying out of range indices or tcs
+ //
+ if (((cur_idx + tc_offset) > index_count)
+ || ((idx[cur_idx+tc_offset]*2+1) > tc_count))
+ {
+ llwarns << "Out of range TC indices, invalid model." << llendl;
+ return LLModel::BAD_ELEMENT;
+ }
+
cv.mTexCoord.setVec(tc[idx[cur_idx+tc_offset]*2+0],
tc[idx[cur_idx+tc_offset]*2+1]);
+
+ if (!cv.mTexCoord.isFinite())
+ {
+ llwarns << "Found NaN while loading tex coords from DAE-Model, invalid model." << llendl;
+ return LLModel::BAD_ELEMENT;
+ }
}
if (norm_source)
{
+ // guard against model data specifiying out of range indices or norms
+ //
+ if (((cur_idx + norm_offset) > index_count)
+ || ((idx[cur_idx+norm_offset]*3+2) > norm_count))
+ {
+ llwarns << "Out of range norm indices, invalid model." << llendl;
+ return LLModel::BAD_ELEMENT;
+ }
+
cv.getNormal().set(n[idx[cur_idx+norm_offset]*3+0],
n[idx[cur_idx+norm_offset]*3+1],
n[idx[cur_idx+norm_offset]*3+2]);
+
+ if (!cv.getNormal().isFinite3())
+ {
+ llwarns << "Found NaN while loading normals from DAE-Model, invalid model." << llendl;
+ return LLModel::BAD_ELEMENT;
+ }
}
cur_idx += idx_stride;
@@ -560,6 +664,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector& fac
domVertices* vertices = (domVertices*) elem.cast();
if (!vertices)
{
+ llwarns << "Could not find vertex source, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
domInputLocal_Array& v_inp = vertices->getInput_array();
@@ -573,6 +678,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector& fac
domSource* src = (domSource*) elem.cast();
if (!src)
{
+ llwarns << "Could not find DOM source, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
v = &(src->getFloat_array()->getValue());
@@ -588,6 +694,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector& fac
domSource* src = (domSource*) elem.cast();
if (!src)
{
+ llwarns << "Could not find DOM source, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
n = &(src->getFloat_array()->getValue());
@@ -600,6 +707,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector& fac
domSource* src = (domSource*) elem.cast();
if (!src)
{
+ llwarns << "Could not find DOM source, invalid model." << llendl;
return LLModel::BAD_ELEMENT;
}
t = &(src->getFloat_array()->getValue());
@@ -634,6 +742,12 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector& fac
vert.getPosition().set(v->get(v_idx),
v->get(v_idx+1),
v->get(v_idx+2));
+
+ if (!vert.getPosition().isFinite3())
+ {
+ llwarns << "Found NaN while loading position data from DAE-Model, invalid model." << llendl;
+ return LLModel::BAD_ELEMENT;
+ }
}
//bounds check n and t lookups because some FBX to DAE converters
@@ -646,6 +760,12 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector& fac
vert.getNormal().set(n->get(n_idx),
n->get(n_idx+1),
n->get(n_idx+2));
+
+ if (!vert.getNormal().isFinite3())
+ {
+ llwarns << "Found NaN while loading normals from DAE-Model, invalid model." << llendl;
+ return LLModel::BAD_ELEMENT;
+ }
}
else
{
@@ -659,6 +779,12 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector& fac
t_idx = llclamp(t_idx, (U32) 0, (U32) t->getCount());
vert.mTexCoord.setVec(t->get(t_idx),
t->get(t_idx+1));
+
+ if (!vert.mTexCoord.isFinite())
+ {
+ llwarns << "Found NaN while loading tex coords from DAE-Model, invalid model." << llendl;
+ return LLModel::BAD_ELEMENT;
+ }
}
else
{
@@ -1591,6 +1717,7 @@ LLSD LLModel::writeModel(
mdl[model_names[idx]][i]["TexCoord0Domain"]["Max"] = max_tc.getValue();
mdl[model_names[idx]][i]["TexCoord0"] = tc;
}
+
mdl[model_names[idx]][i]["TriangleList"] = indices;
if (skinning)
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 454779901..8b55d30a3 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -246,7 +246,6 @@ set(viewer_SOURCE_FILES
llfloaterpathfindingcharacters.cpp
llfloaterpathfindinglinksets.cpp
llfloaterpathfindingobjects.cpp
- llfloaterpermissionsmgr.cpp
llfloaterperms.cpp
llfloaterpostcard.cpp
llfloaterpostprocess.cpp
@@ -768,7 +767,6 @@ set(viewer_HEADER_FILES
llfloaterpathfindingcharacters.h
llfloaterpathfindinglinksets.h
llfloaterpathfindingobjects.h
- llfloaterpermissionsmgr.h
llfloaterperms.h
llfloaterpostcard.h
llfloaterpostprocess.h
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index dc28dd4a6..8b8d59a0d 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -11145,22 +11145,6 @@ This should be as low as possible, but too low may break functionality
Value
0
- PermissionsManagerRect
-
PickerContextOpacity