jerrymarino / xcbuildkit

xcbuildkit is a framework to extend or replace Xcode's build system
Other
216 stars 17 forks source link

[Stability] Prevent UInt64 underflow on writing messages #22

Closed jerrymarino closed 4 years ago

jerrymarino commented 4 years ago

Fix classic integer handling programming error: If encoder.getMsgId() is < 3 it will EXC_BAD_INSTRUCTION (SIGILL).

I introduced a helper function to detect and prevent this error, which makes sure that it won't overflow if used.

Additionally remove all force unwraps and misc dead code in the main code