From 72b0cb146753c0e3801145936c3cf3fd6e8508c5 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 18 Oct 2017 16:31:36 +0300 Subject: MAINT-7779 Logging update --- indra/newview/lltexturefetch.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/newview/lltexturefetch.cpp') diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 84a2f1b597..1085b15976 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -1890,11 +1890,10 @@ bool LLTextureFetchWorker::doWork(S32 param) if (mDecodedDiscard < 0) { - LL_DEBUGS(LOG_TXT) << mID << ": Failed to Decode." << LL_ENDL; if (mCachedSize > 0 && !mInLocalCache && mRetryAttempt == 0) { // Cache file should be deleted, try again - LL_WARNS(LOG_TXT) << mID << ": Decode of cached file failed (removed), retrying" << LL_ENDL; + LL_DEBUGS(LOG_TXT) << mID << ": Decode of cached file failed (removed), retrying" << LL_ENDL; llassert_always(mDecodeHandle == 0); mFormattedImage = NULL; ++mRetryAttempt; @@ -1904,7 +1903,7 @@ bool LLTextureFetchWorker::doWork(S32 param) } else { -// LL_WARNS(LOG_TXT) << "UNABLE TO LOAD TEXTURE: " << mID << " RETRIES: " << mRetryAttempt << LL_ENDL; + LL_DEBUGS(LOG_TXT) << "Failed to Decode image " << mID << " after " << mRetryAttempt << " retries" << LL_ENDL; setState(DONE); // failed } } -- cgit v1.2.3 From 18fa2e6471fe25036341f0375a2f4d4887c8c378 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Thu, 12 Oct 2017 22:55:15 +0200 Subject: MAINT-7081 [FIXED] Access (write) violation / buffer overrun in LLTextureFetchWorker::doWork() The trouble lines are: U8 * buffer = (U8 *) ALLOCATE_MEM(LLImageBase::getPrivatePool(), total_size); if (cur_size > 0) { memcpy(buffer, mFormattedImage->getData(), cur_size); } If 'cur_size > mHttpReplyOffset + append_size' then 'total_size -= src_offset' will cause total_size to be smaller than cur_size causing a write access violation on the memcpy. Since the response is invalid it seemed best to make it follow the other failed partial condition. (transplanted from 737e28ec6b4d74f3ff915a4effc13d7b615a6a9b) --- indra/newview/lltexturefetch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lltexturefetch.cpp') diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 1085b15976..f917faadd4 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -1746,7 +1746,7 @@ bool LLTextureFetchWorker::doWork(S32 param) // In case of a partial response, our offset may // not be trivially contiguous with the data we have. // Get back into alignment. - if (mHttpReplyOffset > cur_size) + if ( (mHttpReplyOffset > cur_size) || (cur_size > mHttpReplyOffset + append_size)) { LL_WARNS(LOG_TXT) << "Partial HTTP response produces break in image data for texture " << mID << ". Aborting load." << LL_ENDL; -- cgit v1.2.3