]> sourceware.org Git - glibc.git/commit
resolve: Remove __res_context_query alloca usage
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 20 Sep 2023 10:16:07 +0000 (10:16 +0000)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 2 Oct 2023 13:54:27 +0000 (10:54 -0300)
commit40c0add7d48739f5d89ebba255c1df26629a76e2
treea378e6b1243cafe665c59578e81ddb75ae3cb44b
parent08e9a60a1ad34425a849c37611e55dd9fb4d3618
resolve: Remove __res_context_query alloca usage

The bufsize on current Linux build is:

   size_t bufsize = (type == 439963904 ? 2 : 1) * (12 + 4 + 255 + 1);

So with upper bound as 544 (2 * (12 + 4 + 255 + 1)).  However, it might
increase to 2 * PACKETSIZE later with malloc.  The default scratch_buffer
should fullfill the most usual allocation requirement.

Checked on x86_64-linux-gnu and i686-linux-gnu.
Reviewed-by: Joe Simmons-Talbott <josimmon@redhat.com>
resolv/res_query.c
This page took 0.042774 seconds and 5 git commands to generate.