moonlight-stream / moonlight-common-c

Core implementation of Nvidia's GameStream protocol
GNU General Public License v3.0
448 stars 166 forks source link

Fixes RTSP session id parsing issue. #39

Closed solidprinciples closed 5 years ago

solidprinciples commented 5 years ago

In the case of extraneous data, it does not properly parse it - this simple fix takes care of this.

cgutman commented 5 years ago

Did you see some scenario where we got a session ID that looked like this or is this more theoretical?

solidprinciples commented 5 years ago

Not in the Gamestream case - but in exploring the process of reverse engineering the server, an RTSP implementation (live555) appends a timeout to the session, i.e: "DEADBEEF;timeout = 60"

The strtok solution will not change the behavior of the code if there is no ";" present either.

Without this, it would be parsed improperly in the standard RTSP case - resulting in an RTSP 454 error - session not found; due to the extra appended data.

cgutman commented 5 years ago

Merged, thanks