Giter Site home page Giter Site logo

Comments (6)

1technophile avatar 1technophile commented on May 26, 2024 1

@ssalonen thanks for the analysis.
I would suggest the fix number 2, and increasing to 816 for ESP32, the other boards with lower ram will not be impacted as they have a separate definition for JSON_MSG_BUFFER.
Also Arduino boards support will be removed soon.

from openmqttgateway.

ssalonen avatar ssalonen commented on May 26, 2024

@1technophile I can happily provide a fix for this one, but let me know if there's something else to try out that would cause a crash

from openmqttgateway.

ssalonen avatar ssalonen commented on May 26, 2024

I also note here that ruuvi is having longest properties (json props json string), at 513 bytes. Second largest is 409 bytes (device index 34, thermobeacon). Of course the StaticJsonDocument needs some more for the overhead

This gives a good indication that there are no other tricky devices

from openmqttgateway.

ssalonen avatar ssalonen commented on May 26, 2024

I will file a PR bit later.

Will also include error handling

from openmqttgateway.

ssalonen avatar ssalonen commented on May 26, 2024

The regression might have happened in recent PR where props have become larger, eg

theengs/decoder#359
Or
theengs/decoder#452

from openmqttgateway.

ssalonen avatar ssalonen commented on May 26, 2024

See PR #1906 for the fix.

I also propose we log any deserialization errors, see #1907 (the rest of the function body still would get executed). In #1907 I did not tweak the implementation any further to avoid access invalid pointers (like what happened here) - I would expect a crash with ESP8266.

from openmqttgateway.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.