nextincr in krb5int_dns_init too small

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

nextincr in krb5int_dns_init too small

Daniel Colascione
krb5int_dns_init has a conventional malloc-and-realloc-until-it-fits
loop, but inside the loop body, we're calling res_nsearch, which can do
non-trivial work. It'd be better to increase the initial guess from 2048
to something bigger; even 4k is a trivial amount of memory these days,
and I'm getting 2786-byte responses.


_______________________________________________
krbdev mailing list             [hidden email]
https://mailman.mit.edu/mailman/listinfo/krbdev

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: nextincr in krb5int_dns_init too small

Greg Hudson
On 02/18/2016 07:46 AM, Daniel Colascione wrote:
> krb5int_dns_init has a conventional malloc-and-realloc-until-it-fits
> loop, but inside the loop body, we're calling res_nsearch, which can do
> non-trivial work. It'd be better to increase the initial guess from 2048
> to something bigger; even 4k is a trivial amount of memory these days,
> and I'm getting 2786-byte responses.

I am preparing a pull request to update the buffer size to 4K.  Am I
correct to asssume that these 2786-byte responses include DNSSEC signatures?

_______________________________________________
krbdev mailing list             [hidden email]
https://mailman.mit.edu/mailman/listinfo/krbdev