From 107b8a922a9f72bae8d066549c675062bee0897f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 14 Aug 2006 22:16:14 +0000 Subject: [BZ #1996] 2006-08-14 Ulrich Drepper [BZ #1996] * libio/memstream.c (open_memstream): Allocate initial buffer with calloc. * libio/wmemstream.c (open_wmemstream): Likewise. * libio/strops.c: Pretty printing. (_IO_str_overflow): Clear uninitialized part of the new buffer. (enlarge_userbuf): New function. (_IO_str_seekoff): Call it if seek position is larger than current buffer. * libio/wstrops.c: Likewise. * libio/vasprintf.c: Add comment as to why we do not have to use calloc instead of malloc to allocate initial buffer. * libio/Makefile (tests): Add bug-memstream1 and bug-wmemstream1. * libio/bug-memstream1.c: New file. * libio/bug-wmemstream1.c: New file. --- libio/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libio/Makefile') diff --git a/libio/Makefile b/libio/Makefile index e9c1d52..0529744 100644 --- a/libio/Makefile +++ b/libio/Makefile @@ -56,7 +56,8 @@ tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \ tst-mmap2-eofsync tst-mmap-offend bug-fopena+ bug-wfflush \ bug-ungetc2 bug-ftell bug-ungetc3 bug-ungetc4 tst-fopenloc2 \ tst-memstream1 tst-memstream2 \ - tst-wmemstream1 tst-wmemstream2 + tst-wmemstream1 tst-wmemstream2 \ + bug-memstream1 bug-wmemstream1 test-srcs = test-freopen all: # Make this the default target; it will be defined in Rules. -- cgit v1.1