fix array index range checking of gat[] in gran_alloc().

This commit is contained in:
Oki Minabe
2022-02-18 00:08:32 +09:00
committed by Xiang Xiao
parent e0ae2963d2
commit 979124928c
+1 -1
View File
@@ -113,7 +113,7 @@ FAR void *gran_alloc(GRAN_HANDLE handle, size_t size)
/* Get the next entry from the GAT to support a 64 bit shift */
if (granidx < priv->ngranules)
if (granidx + 32 < priv->ngranules)
{
next = priv->gat[gatidx + 1];
}