Old-Ding opened a new pull request, #3606:
URL: https://github.com/apache/nuttx-apps/pull/3606

   ## Summary
   - Check wgetjson response, JSON path, request buffer, and POST body 
allocations before use.
   - Return or propagate allocation failures instead of dereferencing NULL 
buffers.
   
   ## Root cause
   Several `malloc()` results in the wgetjson example were used immediately by 
`memcpy()`, `snprintf()`, `web_posts_str()`, `web_post_str()`, or 
`webclient_perform()` without first checking whether allocation succeeded. 
Low-memory paths could therefore crash before the existing cleanup logic ran.
   
   ## Testing
   - `git diff --check`
   - `git show --stat --check --format=fuller HEAD`
   
   Not run: local compile, because this environment does not have `make`, 
`cmake`, `gcc`, `clang`, or `cc` available.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to