aboutsummaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2014-12-04 08:08:37 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2014-12-04 08:08:37 +0530
commitbe349d7042de84c3c5157a5c1fbcad580aed33e1 (patch)
treee49154ef02c2b02573693a3af1a773d5ea3f2470 /NEWS
parente3d6dba5dfe2e125b15ea1dd36c8dfa373bb4956 (diff)
downloadglibc-be349d7042de84c3c5157a5c1fbcad580aed33e1.tar
glibc-be349d7042de84c3c5157a5c1fbcad580aed33e1.tar.gz
glibc-be349d7042de84c3c5157a5c1fbcad580aed33e1.tar.bz2
glibc-be349d7042de84c3c5157a5c1fbcad580aed33e1.zip
ftell: seek to end only when there are unflushed bytes (BZ #17647)
Currently we seek to end of file if there are unflushed writes or the stream is in write mode, to get the current offset for writing in append mode, which is the end of file. The latter case (i.e. stream is in write mode, but no unflushed writes) is unnecessary since it will only happen when the stream has just been flushed, in which case the recorded offset ought to be reliable. Removing that case lets ftell give the correct offset when it follows an ftruncate. The latter truncates the file, but does not change the file position, due to which it is permissible to call ftell without an intervening fseek call. Tested on x86_64 to verify that the added test case fails without the patch and succeeds with it, and that there are no additional regressions due to it. [BZ #17647] * libio/fileops.c (do_ftell): Seek only when there are unflushed writes. * libio/wfileops.c (do_ftell_wide): Likewise. * libio/tst-ftell-active-handler.c (do_ftruncate_test): New test case. (do_one_test): Call it.
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS2
1 files changed, 1 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 581bc8b54c..7312b47eb1 100644
--- a/NEWS
+++ b/NEWS
@@ -13,7 +13,7 @@ Version 2.21
16619, 16740, 16857, 17192, 17266, 17344, 17363, 17370, 17371, 17411,
17460, 17475, 17485, 17501, 17506, 17508, 17522, 17555, 17570, 17571,
17572, 17573, 17574, 17581, 17582, 17583, 17584, 17585, 17589, 17594,
- 17601, 17608, 17616, 17625, 17633, 17664, 17665, 17668.
+ 17601, 17608, 17616, 17625, 17633, 17647, 17664, 17665, 17668.
* CVE-2104-7817 The wordexp function could ignore the WRDE_NOCMD flag
under certain input conditions resulting in the execution of a shell for