mqtt_message_received(): error in assert?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

mqtt_message_received(): error in assert?

Giuseppe Modugno
I was testing the behaviour of MQTT client with big messages and the following assert in mqtt_message_received() was triggered:

LWIP_ASSERT("client->msg_idx < MQTT_VAR_HEADER_BUFFER_LEN", client->msg_idx < MQTT_VAR_HEADER_BUFFER_LEN);

I think client->msg_idx can be equal to MQTT_VAR_HEADER_BUFFER_LEN when buffer is full.

_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

Re: mqtt_message_received(): error in assert?

goldsimon@gmx.de
Am 05.06.2019 um 23:55 schrieb Giuseppe Modugno:
> I was testing the behaviour of MQTT client with big messages and the
> following assert in mqtt_message_received() was triggered:
>
> LWIP_ASSERT("client->msg_idx < MQTT_VAR_HEADER_BUFFER_LEN",
> client->msg_idx < MQTT_VAR_HEADER_BUFFER_LEN);
>
> I think client->msg_idx can be equal to MQTT_VAR_HEADER_BUFFER_LEN when
> buffer is full.

Care to provide a patch (along with a good explanation that makes it
easy to review)?

Thanks,
Simon

_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

Re: mqtt_message_received(): error in assert?

Axel Lin
In reply to this post by Giuseppe Modugno
Giuseppe Modugno <[hidden email]> 於 2019年6月6日 週四 上午5:56寫道:
>
> I was testing the behaviour of MQTT client with big messages and the following assert in mqtt_message_received() was triggered:
>
> LWIP_ASSERT("client->msg_idx < MQTT_VAR_HEADER_BUFFER_LEN", client->msg_idx < MQTT_VAR_HEADER_BUFFER_LEN);
>
> I think client->msg_idx can be equal to MQTT_VAR_HEADER_BUFFER_LEN when buffer is full.

It looks like this is fixed by
http://git.savannah.gnu.org/cgit/lwip.git/commit/?id=2cc420e434744f9f217f2e68f39cf08379517a94

Can you check if it's working in current git master?

_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

Re: mqtt_message_received(): error in assert?

Giuseppe Modugno
Yes, that ASSERT doesn't exist anymore in the git master. Thank you.

Il 11/06/2019 08:12, Axel Lin ha scritto:

> Giuseppe Modugno <[hidden email]> 於 2019年6月6日 週四 上午5:56寫道:
>> I was testing the behaviour of MQTT client with big messages and the following assert in mqtt_message_received() was triggered:
>>
>> LWIP_ASSERT("client->msg_idx < MQTT_VAR_HEADER_BUFFER_LEN", client->msg_idx < MQTT_VAR_HEADER_BUFFER_LEN);
>>
>> I think client->msg_idx can be equal to MQTT_VAR_HEADER_BUFFER_LEN when buffer is full.
> It looks like this is fixed by
> http://git.savannah.gnu.org/cgit/lwip.git/commit/?id=2cc420e434744f9f217f2e68f39cf08379517a94
>
> Can you check if it's working in current git master?
>
> _______________________________________________
> lwip-devel mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/lwip-devel

_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel