rg_etc: check against meaningful size (pointer size is not)
authorCedric Bail <cedric.bail@free.fr>
Thu, 17 Apr 2014 19:26:57 +0000 (21:26 +0200)
committerCedric Bail <cedric.bail@free.fr>
Thu, 17 Apr 2014 19:26:57 +0000 (21:26 +0200)
CID 1195440.

src/static_libs/rg_etc/rg_etc1.c

index ff8af91..a74b1f1 100644 (file)
@@ -1267,7 +1267,7 @@ rg_etc1_indirect_radix_sort(unsigned int num_indices, unsigned int pIndices0[8],
    unsigned int pass;
 
    // ERROR CASE NO ASSERT IN EVAS CODE
-   if (!(key_ofs < sizeof(pIndices0))) return NULL;
+   if (!(key_ofs < sizeof(unsigned int) * 8)) return NULL;
    if (!((key_size >= 1) && (key_size <= 4))) return NULL;
 
    if (init_indices)