calloc(3)-ed a few lines above.
OK tb@
-/* $OpenBSD: open_memstream.c,v 1.9 2023/06/21 13:11:49 claudio Exp $ */
+/* $OpenBSD: open_memstream.c,v 1.10 2023/07/11 12:14:16 claudio Exp $ */
/*
* Copyright (c) 2011 Martin Pieuchot <mpi@openbsd.org>
return (NULL);
}
- *st->string = '\0';
st->pos = 0;
st->len = 0;
st->pbuf = pbuf;
-/* $OpenBSD: open_wmemstream.c,v 1.9 2023/06/21 13:11:49 claudio Exp $ */
+/* $OpenBSD: open_wmemstream.c,v 1.10 2023/07/11 12:14:16 claudio Exp $ */
/*
* Copyright (c) 2011 Martin Pieuchot <mpi@openbsd.org>
return (NULL);
}
- *st->string = L'\0';
st->pos = 0;
st->len = 0;
st->pbuf = pbuf;