Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e625479f authored by Deckard Autoverifier's avatar Deckard Autoverifier Committed by Android Code Review
Browse files

Merge "stagefright aacenc: Make the mem_malloc function 64-bit safe"

parents aacb8216 267dbd82
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -23,6 +23,11 @@


#include	"memalign.h"
#ifdef _MSC_VER
#include	<stddef.h>
#else
#include	<stdint.h>
#endif

/*****************************************************************************
*
@@ -66,8 +71,8 @@ mem_malloc(VO_MEM_OPERATOR *pMemop, unsigned int size, unsigned char alignment,
		pMemop->Set(CodecID, tmp, 0, size + alignment);

		mem_ptr =
			(unsigned char *) ((unsigned int) (tmp + alignment - 1) &
					(~((unsigned int) (alignment - 1))));
			(unsigned char *) ((intptr_t) (tmp + alignment - 1) &
					(~((intptr_t) (alignment - 1))));

		if (mem_ptr == tmp)
			mem_ptr += alignment;