Fixed excessive balloon force crash #1110

Merged
merged 1 commit into from Jan 11, 2016

Projects

None yet

2 participants

@Mista-Tea
Contributor

Similar to the thruster force crash, you can crash servers with balloon force values at 1E35 and above (1E36 on the thruster) or below -1E35.

I've clamped both places where this value is used and removed the redundant code on line 62. I've tested this by both spawning a balloon regularly and by modifying a Duplicator-duped balloon's JSON value to 1E35. Crashes occurred before this patch, and were eliminated after it.

@Mista-Tea Mista-Tea Fixed excessive balloon force crash
Similar to the [thruster force crash](6160c8f#diff-d3d6727ecec503cb9f9bd8afff543124]), you can crash servers with balloon force values at 1E35 and above (1E36 on the thruster) or below -1E35.

I've clamped both places where this value is used and removed the redundant code on line 62. I've tested this by both spawning a balloon regularly and by modifying a Duplicator-duped balloon's JSON value to 1E35. Crashes occurred before this patch, and were eliminated after it.
e1172a5
@robotboy655
Collaborator

1E35 is probably an overkill anyway, but ok.

@robotboy655 robotboy655 merged commit df695c9 into garrynewman:master Jan 11, 2016
@Mista-Tea
Contributor

Thanks :)

@Mista-Tea Mista-Tea deleted the unknown repository branch Jan 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment