Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GoldSource] Some MSG_Read functions can return incorrect values #2324

Closed
2010kohtep opened this issue Apr 27, 2019 · 4 comments
Closed

[GoldSource] Some MSG_Read functions can return incorrect values #2324

2010kohtep opened this issue Apr 27, 2019 · 4 comments
Assignees

Comments

@2010kohtep
Copy link

2010kohtep commented Apr 27, 2019

The MSG_ReadAngle and MSG_ReadHiresAngle functions do not handle situations in which nested read functions had "bad read", which can lead to incorrect result.

image

image

The solution is to check the results of MSG_ReadChar and MSG_ReadShort: if they returned -1, then leave the function with the result 0.

@2010kohtep
Copy link
Author

In addition. The MSG_ReadCoord function has the same problem. The fix is identical. I would also recommend removing the unused sizebuf_t *sb argument.

image

@mikela-valve mikela-valve added this to the Next Release milestone Apr 28, 2019
@mikela-valve mikela-valve self-assigned this Apr 28, 2019
@mikela-valve
Copy link
Member

Fixed, will be included in the next beta.

@mikela-valve
Copy link
Member

mikela-valve commented May 21, 2019

Fixed in beta 'Exe build: 11:12:36 May 21 2019 (8244)'.

@mikela-valve
Copy link
Member

Closing as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants