diff options
author | Stefan Liebler <stli@linux.ibm.com> | 2024-01-11 14:01:18 +0100 |
---|---|---|
committer | Stefan Liebler <stli@linux.ibm.com> | 2024-01-11 16:38:25 +0100 |
commit | 0aabf15a3515a996bd415ff37e29326286c8007e (patch) | |
tree | 63a72163fc3cc7f9d1ec11ccf247a8076b8f75b1 /po | |
parent | c0c259c3bde3b76722d717b4372233b488c8d3ff (diff) | |
download | glibc-0aabf15a3515a996bd415ff37e29326286c8007e.tar.gz glibc-0aabf15a3515a996bd415ff37e29326286c8007e.tar.xz glibc-0aabf15a3515a996bd415ff37e29326286c8007e.zip |
resolv: Fix endless loop in __res_context_query
Starting with commit 40c0add7d48739f5d89ebba255c1df26629a76e2 "resolve: Remove __res_context_query alloca usage" there is an endless loop in __res_context_query if __res_context_mkquery fails e.g. if type is invalid. Then the scratch buffer is resized to MAXPACKET size and it is retried again. Before the mentioned commit, it was retried only once and with the mentioned commit, there is no check and it retries in an endless loop. This is observable with xtest resolv/tst-resolv-qtypes which times out after 300s. This patch retries mkquery only once as before the mentioned commit. Furthermore, scratch_buffer_set_array_size is now only called with nelem=2 if type is T_QUERY_A_AND_AAAA (also see mentioned commit). The test tst-resolv-qtypes is also adjusted to verify that <func> is really returning with -1 in case of an invalid type. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'po')
0 files changed, 0 insertions, 0 deletions