Old-Ding opened a new pull request, #19324:
URL: https://github.com/apache/nuttx/pull/19324

   ## Summary
   - fix the guard in `pci_epc_map_msi_irq()` to reject a NULL EPC or missing 
`map_msi_irq` callback
   - reject out-of-range endpoint function numbers before invoking the 
controller op
   
   ## Why
   `pci_epc_map_msi_irq()` currently uses `&&` between the EPC NULL check and 
the callback check. That dereferences `epc` when it is NULL, and it lets a 
valid EPC with no `map_msi_irq` callback pass through to a NULL function call.
   
   The surrounding EPC wrappers also validate `funcno` before dispatching to 
controller operations, so this helper now follows the same input-validation 
pattern.
   
   ## Testing
   - `git diff --check origin/master...HEAD`
   - `git show --stat --check --format=fuller HEAD`
   - Not run: local NuttX build, because this Windows workstation does not have 
the required C build toolchain installed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to