[PATCH 5.7 101/120] habanalabs: prevent possible out-of-bounds array access