Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ ns_lookup_list_search(char **list, const char *host)
{
size_t host_len = strlen(host), suffix_len;

if (!list)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good practice on defensive programing skills.

But WAMR tends to use a caller-guarantee policy. Caller should make sure their inputs are correct. In this case, wash-app should check inputs before uses Wasm/WASI APIs.

Therefore, I tend to reject this PR.

return false;

while (*list) {
if (*list[0] == '*') {
suffix_len = strlen(*list) - 1;
Expand Down
Loading