plugin:python: check asprintf() errors
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.
Link: http://lkml.kernel.org/r/20170423102258.21609-3-federico.vaga@vaga.pv.it
Signed-off-by: Federico Vaga <federico.vaga@vaga.pv.it>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 file changed