Skip to content
Snippets Groups Projects
Commit 0f080379 authored by Samuel Thibault's avatar Samuel Thibault
Browse files

Reject domain-search when any entry ends with ".."


rather than rejecting only when all of them are bogus.

Reported-by: default avatarMichael T <michael.gr220@gmail.com>
Signed-off-by: default avatarSamuel Thibault <samuel.thibault@ens-lyon.org>
parent c7c151fe
No related branches found
No related tags found
No related merge requests found
Checking pipeline status
......@@ -263,15 +263,15 @@ int translate_dnssearch(Slirp *s, const char **names)
for (i = 0; i < num_domains; i++) {
domains[i].labels = outptr;
domain_mklabels(domains + i, names[i]);
if (domains[i].len == 0) {
/* Bogus entry, reject it all */
g_free(domains);
g_free(result);
return -1;
}
outptr += domains[i].len;
}
if (outptr == result) {
g_free(domains);
g_free(result);
return -1;
}
qsort(domains, num_domains, sizeof(*domains), domain_suffix_ord);
domain_fixup_order(domains, num_domains);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment