mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
fix array index range checking of gat[] in gran_alloc().
This commit is contained in:
@@ -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 */
|
/* 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];
|
next = priv->gat[gatidx + 1];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user