Christian Costa titan.costa@gmail.com writes:
Try 5: Use a growing buffer to store name.
I don't think a growing buffer makes sense for this.
- if (name)
- {
*size = min(*size, This->name_size);
memcpy(name, This->name, *size);
/* Make sure we have the terminating 0 in case of truncation */
name[*size] = 0;
Buffer overflow.