diff options
author | William Todd Stinson <stinson@lindenlab.com> | 2012-10-19 11:21:18 -0700 |
---|---|---|
committer | William Todd Stinson <stinson@lindenlab.com> | 2012-10-19 11:21:18 -0700 |
commit | 31f622ca049719e8d4da9368c1e7d5694ed069aa (patch) | |
tree | 793f5ecdff40e5ae5917dea89dd3fcc31ebe6977 /indra | |
parent | 155cb976cb807771772b6bab62709709348c918b (diff) | |
parent | f2a674274fc043e55ad3e78e05120d34ed2ff361 (diff) |
Pull and merge from ssh://hg@bitbucket.org/lindenlab/viewer-beta.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcommon/llmemory.h | 6 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h index 40cde485cf..10013e0f92 100644 --- a/indra/llcommon/llmemory.h +++ b/indra/llcommon/llmemory.h @@ -87,7 +87,11 @@ inline void* ll_aligned_realloc_16(void* ptr, size_t size, size_t old_size) // r void* ret = ll_aligned_malloc_16(size); if (ptr) { - memcpy(ret, ptr, old_size); + if (ret) + { + // Only copy the size of the smallest memory block to avoid memory corruption. + memcpy(ret, ptr, llmin(old_size, size)); + } ll_aligned_free_16(ptr); } return ret; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index ba047487f5..b6f3301c6c 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -706,6 +706,8 @@ void LLPipeline::cleanup() mInitialized = FALSE; mDeferredVB = NULL; + + mCubeVB = NULL; } //============================================================================ |