Commits

Scott Lawrence committed f908a8c Merge

merge back late fix for MAINT-1753

  • Participants
  • Parent commits fa1d3d9, c5b1cef

Comments (0)

Files changed (2)

 173c2809f9873499c4b9d6bc044ec941c954d3fb DRTVWR-228
 1dc94555582f52718834081e7659e973ae4521f7 3.4.1-beta8
 52c164c8023a5e65f3dc1b0bbb7fa1dd0c631b6b DRTVWR-231
-9c4519aa5c70f7560111fb5c740d3a7dc20a845a 3.4.1-beta9
+464cf7a63a9a2f95bc4972dc022ca765e93de7d3 DRTVWR-233
+637fe8bbee5e24940448198c221d5ee0fa3247b4 3.4.1-beta9

File indra/llcommon/llmemory.h

 	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;