Fix crash in _IO_wfile_sync (bug 20568)
authorAndreas Schwab <schwab@suse.de>
Tue, 14 May 2019 15:14:59 +0000 (17:14 +0200)
committerAndreas Schwab <schwab@suse.de>
Wed, 15 May 2019 14:47:09 +0000 (16:47 +0200)
commit32ff397533715988c19cbf3675dcbd727ec13e18
treefb529b404d7136b24968ebbf8618af9ea13c7b79
parenta9368c34d70cef91ca59b09941f496df11d6b146
Fix crash in _IO_wfile_sync (bug 20568)

When computing the length of the converted part of the stdio buffer, use
the number of consumed wide characters, not the (negative) distance to the
end of the wide buffer.
ChangeLog
libio/Makefile
libio/tst-wfile-sync.c [new file with mode: 0644]
libio/tst-wfile-sync.input [new file with mode: 0644]
libio/wfileops.c