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
Labels

Comments

@2010kohtep
Copy link

@2010kohtep 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

This comment has been minimized.

Copy link
Author

@2010kohtep 2010kohtep commented Apr 27, 2019

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

This comment has been minimized.

Copy link
Collaborator

@mikela-valve mikela-valve commented May 15, 2019

Fixed, will be included in the next beta.

@mikela-valve

This comment has been minimized.

Copy link
Collaborator

@mikela-valve mikela-valve commented May 21, 2019

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

@mikela-valve

This comment has been minimized.

Copy link
Collaborator

@mikela-valve mikela-valve commented Jun 2, 2019

Closing as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.