4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-29 10:30:50 +08:00
Jeff Johnston 05272960ab 2016-12-15 Giuseppe Musumeci <giuseppe.musumeci@broadcom.com>
__sinit initialises some common file descriptors as line buffered and
relies on the first users of such FDs to call __smakebuf_r. If
__smakebuf_r realises there's no space for a buffer (malloc returns
NULL), it makes them unbuffered. However, while setting the __SNBF
bit, it doesn't clear the __SLBF bit in the flags. Depending on the
order in which functions check buffering flags in the FD, sometime
they assume it's line buffered (e.g. __sfvwrite_r), trashing
application memory that's not really been allocated to them.

This patch solves the problem by clearing the unbuffered/line buffered
flag when setting the line buffered/unbuffered flag.
2016-12-15 12:12:31 -05:00
..
2016-07-04 17:13:55 +01:00
2016-10-22 22:00:51 +02:00
2016-07-04 17:13:55 +01:00
2016-07-04 17:13:55 +01:00
2016-07-04 17:13:55 +01:00
2016-07-04 17:13:55 +01:00
2016-07-04 17:13:55 +01:00
2016-07-04 17:13:55 +01:00
2016-07-04 17:13:55 +01:00
2016-08-31 13:43:19 +02:00
2016-12-05 16:43:17 +01:00
2016-07-04 17:13:55 +01:00
2016-07-04 17:13:55 +01:00
2016-07-04 17:13:55 +01:00
2016-07-04 14:17:10 +01:00
2016-07-04 14:17:10 +01:00
2016-07-04 17:13:55 +01:00