fix crash issue on 64bit environment 41/44741/3 accepted/tizen/mobile/20150803.093905 accepted/tizen/tv/20150803.093912 accepted/tizen/wearable/20150803.093923 submit/tizen/20150803.033341
authorjihae.yi <jihae.yi@samsung.com>
Mon, 27 Jul 2015 09:27:34 +0000 (18:27 +0900)
committerjihae.yi <jihae.yi@samsung.com>
Mon, 27 Jul 2015 12:12:10 +0000 (21:12 +0900)
Change-Id: I1553cd57b160d0b993f005f1de6d43c6aad7ce6d

src/media_packet.c

index a95adea59e8bd7ff04d9ed921dc0c86b80bd3580..0748503eb31cff7ab6d12af4c7c6c55a7deea88a 100755 (executable)
@@ -1432,16 +1432,16 @@ static void* _aligned_malloc_normal_buffer_type (uint64_t size, int alignment)
     unsigned char* buffer_ptr;
     unsigned char* temp_ptr;
 
-    if((temp_ptr = (void*)malloc(size + alignment)) != NULL)
+    if((temp_ptr = (unsigned char*)malloc(size + alignment)) != NULL)
     {
-        buffer_ptr = (void*)((unsigned int)(temp_ptr + alignment - 1) & (~(unsigned int)(alignment -1)));
+        buffer_ptr = (unsigned char*)((unsigned long int)(temp_ptr + alignment - 1) & (~(unsigned long int)(alignment -1)));
 
         if(buffer_ptr == temp_ptr)
         {
             buffer_ptr += alignment;
         }
 
-        *(buffer_ptr - 1) = (unsigned int)(buffer_ptr - temp_ptr);
+        *(buffer_ptr - 1) = (unsigned char)(buffer_ptr - temp_ptr);
         return (void*)buffer_ptr;
     }