moonlight-stream / moonlight-embedded

Gamestream client for embedded systems
https://github.com/moonlight-stream/moonlight-embedded/wiki
GNU General Public License v3.0
1.48k stars 322 forks source link

Uninitialized local variable fdindex #889

Closed szsam closed 3 months ago

szsam commented 3 months ago

https://github.com/moonlight-stream/moonlight-embedded/blob/9c0a2f5edee7b0b4055093dfaa13fdf0b8037b32/src/loop.c#L86 fdindex may be uninitialized when accessed here.


Please provide the following info.

NVidia Geforce Experience version: Moonlight Embedded version: Moonlight Embedded source: repository/included in distribution/compiled from source/... Moonlight Embedded running on: Raspberry Pi/Cubox-i/Hummingboard/Other linux device/... Moonlight Embedded running on distribution: Arch Linux/Raspbian/OpenELEC/...

Verbose output -verbose of Moonlight Embedded:

What is the expected result?

What happens instead of that?

cgutman commented 3 months ago

This was already fixed in dc03235a6212dce5a8c8c8f8294e75e7e1677977 (and was only ever reachable if the caller was buggy and invoked loop_remove_fd() for an fd that was never passed to loop_add_fd()).