shithub: libvpx

Download patch

ref: 89b1c073441a18ecb96b8dcd8ee13714bce94284
parent: 1907d91c42e25b9bc78d0f7c04963109bb3e4d8f
parent: a532c243bb2b5bb0fd0ef295eb019518cc532ca5
author: Johann Koenig <johannkoenig@google.com>
date: Mon Aug 6 20:33:03 EDT 2018

Merge "vp9: address integer sanitizer warning"

--- a/vp9/decoder/vp9_decodeframe.c
+++ b/vp9/decoder/vp9_decodeframe.c
@@ -1532,9 +1532,9 @@
 
 // sorts in descending order
 static int compare_tile_buffers(const void *a, const void *b) {
-  const TileBuffer *const buf1 = (const TileBuffer *)a;
-  const TileBuffer *const buf2 = (const TileBuffer *)b;
-  return (int)((int64_t)buf2->size - buf1->size);
+  const TileBuffer *const buf_a = (const TileBuffer *)a;
+  const TileBuffer *const buf_b = (const TileBuffer *)b;
+  return (buf_a->size < buf_b->size) - (buf_a->size > buf_b->size);
 }
 
 static const uint8_t *decode_tiles_mt(VP9Decoder *pbi, const uint8_t *data,