Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buffer overrun on large data in feed save? #147

Open
pete-thompson opened this issue Feb 20, 2021 · 3 comments
Open

Buffer overrun on large data in feed save? #147

pete-thompson opened this issue Feb 20, 2021 · 3 comments

Comments

@pete-thompson
Copy link

pete-thompson commented Feb 20, 2021

  • Arduino board: ESP32

  • Arduino IDE version (found in Arduino -> About Arduino menu): 1.8.13

  • List the steps to reproduce the problem below (if possible attach a sketch or
    copy the sketch code in too):

My sketch is rebooting frequently. The most recent thing that I've changed is to write long debug messages into an Adafruit IO feed. It appears that the messages are arriving in my feed, but with very odd values for lat/long (I don't set values so would expect 0,0). I read through the code in AdafruitIO_Data.cpp and see that it's using strcpy to copy the incoming data to the buffer without any checks for buffer overrun - so I'm guessing that if I send something longer than 45 characters I'm causing random issues that sometimes result in invalid pointer dereferences and reboots.

@brentru
Copy link
Member

brentru commented Feb 22, 2021

, but with very odd values for lat/long (I don't set values so would expect 0,0).

Do these odd values for lat/long show up on the feed's feed page on io.adafruit.com?

@pete-thompson
Copy link
Author

Yes, the values show in the feed. I can't find the specific values just now, but they were huge numbers that clearly weren't valid.

@brentru
Copy link
Member

brentru commented Feb 24, 2021

Could you file an issue at io.adafruit.com/support so we can take a look? Please include the name of the feed where this appeared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants