Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] MQTTDeserialize_unsubscribe need to judge maxcount with *count

Hi,
I got an invalid unsubscribe packet in base64 format "rS8BAAABAAAAAAAADGlvdC0wNDBhMDFrcARtcXR0BmlvdGh1YghhbGl5dW5jcwNjbw==",it may cause coredump.After review the code, I find that 
https://github.com/eclipse/paho.mqtt.embedded-c/blob/32ad8d0d19ac982e32f5f4358adc00e5511ecff5/MQTTPacket/src/MQTTUnsubscribeServer.c#L34 
MQTTDeserialize_unsubscribe  didn't judge maxcount with *count,
if set maxcount to 1,and init topicFilters with size 1,*count will bigger than maxcount,topicFilters[*count] cause memory access violation.
https://github.com/eclipse/paho.mqtt.embedded-c/pull/259  anyone can review ?

Back to the top