Hi,

Current version of uClibc-ng has issue in open_memstream() function.
If the cookie variable is NULL (due malloc() fail) then null pointer is dereferenced after if block.

The attached patch fixes this issue.
-- 
Best regards,
Eugene