The code was validating the string but the man page for asprintf(3)
says clearly:
If memory allocation wasn't possible, or some other error occurs,
these functions will return -1, and the contents of strp are undefined.
So, we cannot really rely on the returned string pointer.
The code was validating the string but the man page for asprintf(3)
says clearly:
If memory allocation wasn't possible, or some other error occurs,
these functions will return -1, and the contents of strp are undefined.
So, we cannot really rely on the returned string pointer.
2 matches
Mail list logo