diff options
-rw-r--r-- | newlib/ChangeLog | 5 | ||||
-rw-r--r-- | newlib/libc/stdio/open_memstream.c | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index a00d38dff..0116fd1fb 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2014-02-20 Corinna Vinschen <vinschen@redhat.com> + + * libc/stdio/open_memstream.c (internal_open_memstream_r): Initialize + c->pos to 0. + 2014-02-11 Joey Ye <joey.ye@arm.com> * libc/sys/arm/syscalls.c (_sbrk): Define as weak symbols. diff --git a/newlib/libc/stdio/open_memstream.c b/newlib/libc/stdio/open_memstream.c index e33063b7c..5de99474d 100644 --- a/newlib/libc/stdio/open_memstream.c +++ b/newlib/libc/stdio/open_memstream.c @@ -355,6 +355,7 @@ _DEFUN(internal_open_memstream_r, (ptr, buf, size, wide), c->storage = c; c->pbuf = buf; c->psize = size; + c->pos = 0; c->eof = 0; c->saved.w = L'\0'; c->wide = (int8_t) wide; |