-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
esp_http_client: fix the residual data issue and potential out-of-bounds access (IDFGH-10530) #11775
Conversation
…nds access 1. Fix potential out-of-bounds access when calling `strlen(local_response_buffer)` if `content_length` is greater than or equal to the length of `local_response_buffer` due to missing the terminator `\0` at the last character position. 2. Fix the residual data issue when the previous request is longer than the subsequent request while outputting the `local_response_buffer` for each request in the `http_rest_with_url()` function.
Hello @hwqchi |
sha=5ed88da1d37473dfaca32039004ccc1cf7d331d0 |
Hello @hwqchi Thanks! |
Hello @hwqchi |
Hey @hmalpani, I'm really sorry for taking so long to reply to your feedback on my pull request. Life has been quite busy lately, and I couldn't find the time to respond promptly. First of all, I want to thank you from the bottom of my heart for going through my code and providing valuable suggestions. I truly appreciate the effort you put into reviewing it. I also want to let you know that I've tried out the changes you suggested and tested the modified code, and I'm happy to report that everything is working perfectly now. Your modifications have effectively resolved the issues, and I found your solution much better than my previous attempt with "memset(0)". Once again, I apologize for the inconvenience caused by my delayed reply. Your contribution and guidance mean a lot to me, and I promise to be more prompt and proactive in the future. By the way, I'll be running some additional tests on strict cases in the coming days, just to ensure everything is working flawlessly. Thanks again for your understanding and support. All the best, |
Merged with ebc118b |
strlen(local_response_buffer)
ifcontent_length
is greater than or equal to the length oflocal_response_buffer
due to missing the terminator\0
at the last character position.local_response_buffer
for each request in thehttp_rest_with_url()
function.