diff options
author | William Todd Stinson <stinson@lindenlab.com> | 2012-10-22 11:32:46 -0700 |
---|---|---|
committer | William Todd Stinson <stinson@lindenlab.com> | 2012-10-22 11:32:46 -0700 |
commit | 35eb3ed3ee723d77d72026cd35f85c5febd28916 (patch) | |
tree | b8f68b7a026a87e94e5d7b4eed2f70e128af9b5c | |
parent | 1cddc2aa27d5b6f37fc0041a46910416471aa09a (diff) | |
parent | 1b0ea26ecb82b432efd19b319116f94ce58e2b48 (diff) |
Pull and merge from https://bitbucket.org/lindenlab/viewer-development.
-rwxr-xr-x | .hgtags | 3 | ||||
-rw-r--r-- | indra/llcommon/llmemory.h | 6 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 2 |
3 files changed, 10 insertions, 1 deletions
@@ -334,3 +334,6 @@ fba99f381b8d4ad1b7b42fa4993b29998d95be18 DRTVWR-179 524da902713e8b60322640b9825101add4a7c497 3.4.1-beta7 173c2809f9873499c4b9d6bc044ec941c954d3fb DRTVWR-228 1dc94555582f52718834081e7659e973ae4521f7 3.4.1-beta8 +52c164c8023a5e65f3dc1b0bbb7fa1dd0c631b6b DRTVWR-231 +464cf7a63a9a2f95bc4972dc022ca765e93de7d3 DRTVWR-233 +637fe8bbee5e24940448198c221d5ee0fa3247b4 3.4.1-beta9 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 8c989ca77f..e30f78e021 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -706,6 +706,8 @@ void LLPipeline::cleanup() mInitialized = FALSE; mDeferredVB = NULL; + + mCubeVB = NULL; } //============================================================================ |