switchbrew / libnx

Library for Switch Homebrew
https://switchbrew.github.io/libnx/
ISC License
1.26k stars 167 forks source link

service: Static assert arguments aren't pointers to prevent failure-to-deref #623

Closed SciresM closed 11 months ago

SciresM commented 11 months ago

I got very frustrated just now by failing to dereference an output pointer argument, so I added a static assertion that the input/output to the service dispatch macros aren't pointers.

This immediately caught three cases where we failed to invoke dispatch function correctly, so this also fixes those.