fix(manifest): return the matching PAB manifest entry (#28315)

board_query_manifest walked the list for mft[ndx].id == id then
returned &mft[id]. On a sparse list that is the wrong row, and for
PX4_MFT_T100_ETH (id 7) it is out of bounds.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
This commit is contained in:
Jacob Dahl authored and GitHub committed 2026-08-20 19:48:57 -06:00
1 parent 7c796818e7
commit db3b630dde
1 file changed
+1 -1
+1 -1
View File
@@ -560,7 +560,7 @@ __EXPORT px4_hw_mft_item board_query_manifest(px4_hw_mft_item_id_t id)
if (boards_manifest != px4_hw_mft_list_uninitialized)
for (unsigned int ndx = 0; ndx < boards_manifest->entries; ndx++) {
if (boards_manifest->mft[ndx].id == id) {
rv = &boards_manifest->mft[id];
rv = &boards_manifest->mft[ndx];
break;
}
}