baresip / re

Generic library for real-time communications with async IO support
BSD 3-Clause "New" or "Revised" License
132 stars 81 forks source link

http/client: use dynamically sized buffers for PEM setters #1117

Closed maximilianfridrich closed 4 months ago

maximilianfridrich commented 4 months ago

The setters http_client_set_certpem and http_client_set_keypem pre-allocated a fixed size buffer of 512 byte. The required size is known at that time, so the correct size can be allocated right away and no resizing is needed in mbuf_write_str.

alfredh commented 4 months ago

Thanks, if you dont mind I will merge this after the release tomorrow ...

maximilianfridrich commented 4 months ago

Sounds good, there is no rush. Thanks @alfredh.