Giter Site home page Giter Site logo

Comments (4)

icraggs avatar icraggs commented on July 28, 2024 1

I've added a fix for this in readPacket which I believe does most of the job. If the read buffer is very small (less than the header + length of remaining length, between 0 and 5) then that could still be a problem, but buffers of that size are not very useful anyway.

from paho.mqtt.embedded-c.

andrewchambers avatar andrewchambers commented on July 28, 2024

Yes, this library seems to have many buffer overflows and other similar issues, I would not recommend using it when you don't trust your endpoint.

from paho.mqtt.embedded-c.

eden-wang avatar eden-wang commented on July 28, 2024

I found the problem too. When read buffer is not enough, I disgard the rest data. Here is the main codes

/* erase useless data */
read_bytes = 0;
while (read_bytes < rem_len || expired(timer))
{
    read_bytes += c->ipstack->mqttread(c->ipstack,
            c->readbuf,
            min(c->readbuf_size, rem_len - read_bytes),
            left_ms(timer));
}

from paho.mqtt.embedded-c.

AkremToujani avatar AkremToujani commented on July 28, 2024

Hi Teams,
I'm using paho mqtt client with NUCLEO STM32 board,
I fixed the KeepAlive Interval to 30 min (1800s) and yield(100), but, after 9 hours the client has disconnected.

any help please
thanks a lot

from paho.mqtt.embedded-c.

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.