Miquel Llobet <mllobet...@gmail.com> writes:

>     Could this be dinamically allocated?
>
> Indeed it can! Thanks Giuseppe and Darshit for pointing out. Ideally
> we should change all the resp_header_copy calls to resp_header_strdup
> (dynamic resp header copy). There is a bit to code to change, as the
> function returns are different etc. expect a big patch.

since there is a reasonable upperbound value, can't we just have
something like: "char *hdrval = xmalloc(8192);"?

What is left to do is ensure we don't leak this buffer when the function
exits.

Regards,
Giuseppe

Reply via email to