#37 FB_MQTTPUBSUB : Before sending a payload, ensure that MQTT.MQTTParam.g_udiMaxPayloadSize and g_udiMaxPacketSize are appropriately set

1.0.0.0: EoN
closed
aliazzz
None
2020-10-18
2020-07-07
i-campbell
No

As MQTT.MQTTParam.g_udiMaxPayloadSize and MQTT.MQTTParam.g_udiMaxPacketSize are library parameters, the end user has to set these, we cannot change them using the library. However, we can raise errors if we try to send something too big.
To investigate: what happens when a packet or payload is received which is too big?

Discussion

  • i-campbell

    i-campbell - 2020-09-16

    In the current version of the MQTT Client library, a received payload too big will Error the MQTTClient without Error Message. Sending a payload too big will result in an Access Violation.
    So we should definitely error check the payload is smaller than the g_udiMaxPayloadSize.

     
  • i-campbell

    i-campbell - 2020-09-16
    • Milestone: MVP EoN --> 1.0.0.0: EoN
     
  • hermsen

    hermsen - 2020-09-30
    • status: open --> accepted
     
  • hermsen

    hermsen - 2020-09-30

    Check behaviour of this occurrence (via unit-test) and implement options for mitigation:

    • raise an error in the log for occurrence: payload > g_udiMaxPayloadSize,
    • skip sending of payload if: payload > g_udiMaxPayloadSize
     
  • hermsen

    hermsen - 2020-10-18
    • send msg size checked > g_udiMaxPayloadSize
    • send msg size checked <= 0
    • log warning with appropriate message

    Recv buffer should get a separate ticket in SVP phase

     
  • hermsen

    hermsen - 2020-10-18
    • status: accepted --> pending
     
  • hermsen

    hermsen - 2020-10-18
    • status: pending --> closed
     

Log in to post a comment.