summaryrefslogtreecommitdiff
path: root/libc/stdio/open_memstream.c
AgeCommit message (Collapse)Author
2019-03-02Fix NULL pointer dereference in open_memstream()Eugene Yudin
--000000000000cb1b1305827e5ae0 Content-Type: text/plain; charset="UTF-8" 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 <div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>Current version of uClibc-ng has issue in open_memstream() function.</div><div>If the cookie variable is NULL (due malloc() fail) then null pointer is dereferenced after if block.</div><div><br></div><div>The attached patch fixes this issue.<br clear="all"><div>-- <br></div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div><span><div>Best regards,<br></div>Eugene</span></div></div></div></div></div></div></div></div></div>
2015-12-09Reduce the initial buffer size for open_memstreamWaldemar Brodkorb
Reduce the initial buffer size for open_memstream (used by vasprintf), as most strings are usually smaller than that. Realloc the buffer after finishing the string to further reduce size. Problem appears in case of UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y, see http://dev.openwrt.org/ticket/13024 Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2012-06-15stdio.h: update partially, mainly for POSIX 2008Peter S. Mazinger
Guard some UCLIBC specific parts. Add comment about bits/getopt.h. open_memstream.c: remove __restrict according to SuSv4. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-09-18trim Experimentally off and uncommented hiddenBernhard Reutner-Fischer
sed -i -e '/Experimentally off - /d' $(grep -rl "Experimentally off - " *) sed -i -e '/^\/\*[[:space:]]*libc_hidden_proto(/d' $(grep -rl "libc_hidden_proto" *) should be a nop Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2008-11-20Last portion of libc_hidden_proto removal.Denis Vlasenko
Appears to build fine (several .configs tried)
2008-09-21Fix up memset() argument ordering in open_memstream(). PreviouslyPaul Mundt
parts of the buffers were not being zeroed out as expected. Reported by Dmytro Gorbunov <dmitro.gorbunov@gmail.com>.
2008-07-23- trim any trailing whitespaceBernhard Reutner-Fischer
2008-05-20replace "if (p) free(p)" by just "free(p)" - free(NULL) is safe.Denis Vlasenko
2008-05-19Moving libc_hidden_proto's into #ifdef UCLIBC_INTERNAL blockDenis Vlasenko
in string.h and strings.h. This caught unguarded string ops in libc/inet/ethers.c __ether_line_w() function. I will wait for fallout reports for a week or so, then continue converting more libc_hidden_proto's.
2006-02-13Mark functions as GNU extensionsPeter S. Mazinger
2006-01-14make DODEBUG=y happy, update sysdeps/common/* copyrightPeter S. Mazinger
2006-01-14hidden_def/hidden_proto: convert all users (I hope) termios split, add some ↵Peter S. Mazinger
missing headers, other jump relocs removed
2005-12-08Hide some of the f* *printf, use them as wellPeter S. Mazinger
2005-12-03More hiding, including __mempcpyPeter S. Mazinger
2005-12-01Hide mostly used functionsPeter S. Mazinger
2004-02-11New stdio core. Should be more maintainable. Fixes a couple of bugs.Manuel Novoa III
Codepaths streamlined. Improved performance for nonthreaded apps when linked with a thread-enabled libc. Minor iconv bug and some locale/thread related startup issues fixed. These showed up in getting a gcj-compiled java helloworld app running. Removed some old extension functions... _stdio_fdout and _stdio_fsfopen.