Fix off-by-one causing buffer overflow in open_memstream Fixes #140 Signed-off-by: phirsov <41143811+phirsov@users.noreply.github.com>