On 2016-09-05 08:01, David Gwynne wrote:
On 5 Sep 2016, at 12:13, Ali H. Fardan <r...@firemail.cc> wrote:

You can't specify a buffer size in asprintf() therefore, it is not secure,
you can see that snprintf() does write to the `i` bytes to the buffer

asprintf allocates the memory it needs to write to, unlike snprintf
which requires a preallocated buffer.

when the destination is a pointer to a char, and the passed argument is a
memory address, how is it supposed to determine the correct buffer size?

Raiz

Reply via email to