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

mqtt部分有个地方有问题,麻烦确认下? #3

Open
wingceltis-c opened this issue Sep 12, 2018 · 0 comments
Open

mqtt部分有个地方有问题,麻烦确认下? #3

wingceltis-c opened this issue Sep 12, 2018 · 0 comments

Comments

@wingceltis-c
Copy link

mqtt.c
Mqtt_PackConnectPkt 函数中, id_len 定义是uint16_t,后面使用这个变量进行小于0的比较

id_len = Mqtt_CheckClentIdentifier(id); //这条语句是有可能返回-1的,判断会有问题
if(id_len < 0) {
return MQTTERR_ILLEGAL_CHARACTER;
}
具体上下文没有看,编译警告发现的,在基于开发板的SDK移植实例(MQTT)下面提供的工程源码中有调用该方法,并且具有相同的错误

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

No branches or pull requests

1 participant