emqx / CocoaMQTT

MQTT 5.0 client library for iOS and macOS written in Swift
https://www.emqx.com/en
Other
1.57k stars 411 forks source link

Fix overflow crash when reading length #516

Closed przemyslaw-szurmak closed 1 year ago

przemyslaw-szurmak commented 1 year ago

Another quite "popular" crash we have is related to multiplication overflow. This is workaround for this issue.

Screenshot 2023-02-03 at 11 27 36

Importat note This is more like workaround but my knowledge of MQTT standard and logic inside library is to little to suggest something better. I would like to ask @leeway1208 for some help here because most probably, it's not right way to fix this.

leeway1208 commented 1 year ago

Thank you for your great support. I will try to fix it on your commits.😄