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

fix:fixed crash issues when the illegal topic is received #101

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wuhaogs
Copy link
Contributor

@wuhaogs wuhaogs commented Mar 16, 2024

在大量压测中,设备建立mqtt连接之后,偶现收到下行异常主题(出现异常主题原因我怀疑时,socket读取到异常消息所致),概率出现crash问题。
原因:
line56中,if条件语句为真,即异常exit,返回值理应为error(0)。但实际返回值却可能会被line53行修改为了1。
此时调用MQTTDeserialize_publish接口的逻辑,可能会因为payload为空,及payloadlen为0,产生非法地址访问。

@wuhaogs
Copy link
Contributor Author

wuhaogs commented Mar 16, 2024

image
这里错误是什么原因呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant