lwIP - A Lightweight TCP/IP stack - Patches: patch #10302, http_client: Fix argument...
You are not allowed to post comments on this tracker with your current authentication level.
patch #10302: http_client: Fix argument validation
Submitter: | Zhang Maiyun <myzhang1029> | ||
Submitted: | Tue 20 Dec 2022 10:53:22 PM UTC | ||
Category: | apps | Priority: | 5 - Normal |
Status: | None | Privacy: | Public |
Assigned to: | None | Open/Closed: | Open |
Planned Release: | None |
Attached Files
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 2 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2022-12-20 | myzhang1029 | Attached File | - | Added httpc_arg.patch, #54129 | |
Attached File | - | Added httpc_doc.patch, #54130 |
Powered by Savane 3.13-caa5.
Corresponding source code
In httpc_get_file, httpc_get_file_dns, and similar functions, there is an argument
check to make sure server_addr, uri, and recv_fn are not NULL. It suggests that
settings may be NULL, but setting it NULL immediately causes dereferencing of
null pointers in the following lines.
On the contrary, recv_fn should be allowed to be NULL because httpc_tcp_recv
already checks whether it is set and provides a default action otherwise near http_client.c
line 342.
I believe this is an error in the argument validation code and httpc_arg.patch is attached
to fix it.
On a side note, the http_client group of functions really lack documentation or unit tests.
httpc_doc.patch is my first try. If it looks good, I can continue adding more
documentation, tests, and examples.