From fb87ee96d7dd0714d52004e4676629f8d9db732f Mon Sep 17 00:00:00 2001 From: "Vladimir A. Nazarenko" Date: Tue, 6 Jan 2015 19:19:44 -0800 Subject: Fix incorrect mount table entry parsing in __getmntent_r When mount entry contains only four fields and have more then one space or tab at the and, mp.mnt_freq and mp.mnt_passno will be set to some specific values as side effect from parsing of previus mount entry. It is because sscanf(""," %d %d ", &a, &b) returns -1, but this case is unprocessed. Values of mp.mnt_freq and mp.mnt_passno stays unchanged. This patch is attempt to fix described issue by removing trailing tabs and spaces. --- ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index b5aa6e5d8e..9ca4f27338 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2015-01-06 Vladimir A. Nazarenko + +. [BZ #17273] + * misc/mntent_r.c (__getmntent_r): Cut off trailing spaces + and tabs from buffer before parsing fstab entry. + * misc/tst-mntent.c (main): Add test for mount entry with + trailing spaces and tabs. + 2015-01-06 Joseph Myers [BZ #17748] -- cgit v1.2.3