mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-07-24 15:27:41 +08:00
px4_task_t is a plain int and callers hold -1 for "no task" (e.g. dataman's g_task_id after stop). The bounds checks only tested id < PX4_MAX_TASKS, which is true for negative ids, so px4_task_join(-1) and px4_task_delete(-1) would index taskmap[-1] out of bounds. Check id >= 0 as well. Signed-off-by: Julian Oes <julian@oes.ch>