[sr-dev] rtpengine, Question about 'str_sprintf'
Richard Fuchs
rfuchs at sipwise.com
Thu Oct 23 16:45:35 CEST 2014
On 10/23/14 08:32, Frederic-Philippe Metz wrote:
> Hi all,
>
> I have a question resp. str_sprintf:
>
> At the end, it ends up in 'INLINE str *__str_vsprintf(const char *fmt,
> va_list ap)' in str.h, but what I understand is that vasprintf does not
> allocate memory and 'INLINE str *__str_vsprintf(const char *fmt, va_list
> ap)' does not allocate memory too. So there's a risk of writing a string
> into a memory area not allocated before ? Am I right or isn't it a good
> day for coding today :-) ?
vasprintf does allocate memory through malloc.
cheers
More information about the sr-dev
mailing list