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

Crash when starting game using some GRF files. #138

Closed
DorpsGek opened this issue Apr 25, 2006 · 1 comment
Closed

Crash when starting game using some GRF files. #138

DorpsGek opened this issue Apr 25, 2006 · 1 comment
Labels
component: NewGRF This issue is related to NewGRFs flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

mart3p opened the ticket and wrote:

I have been experiencing a random crash when using pb_ukrs.grf.

This problem was introduced in r4537 in newrgf.c. In the process of replacing the "if" cascade with a switch block in the sprite group loader, a buffer length check was removed.

A varaction 2 type 85 or 86 (doubleword type) will fall through the switch block to the default case (for loading normal (non-varaction) action 2s).

A type 85, for example, will then be processed as if it had 0x85 loaded states, so data is read from past the end of the buffer. This sometimes causes an immediate crash but more often will crash when a game is started.

The patch re-adds a length check. It also adds a case, to explicitly test for types 85, 86, 89 and 8A, and give a suitable debug message.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/138
@DorpsGek
Copy link
Member Author

peter1138 closed the ticket.

Reason for closing: Fixed

Ongoing work, this particular problem has been fixed now...


This comment was imported from FlySpray: https://bugs.openttd.org/task/138

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) component: NewGRF This issue is related to NewGRFs bug labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: NewGRF This issue is related to NewGRFs flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant