]> git.ipfire.org Git - thirdparty/glibc.git/commit
Fix incorrect mount table entry parsing in __getmntent_r
authorVladimir A. Nazarenko <naszar@ya.ru>
Wed, 7 Jan 2015 03:19:44 +0000 (19:19 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 7 Jan 2015 03:51:01 +0000 (19:51 -0800)
commitfb87ee96d7dd0714d52004e4676629f8d9db732f
tree650a8563ae0ea966709d998aeb4391f81df4b87f
parent01238691bb03f0110455b663439eecf9a58c8f83
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
NEWS
misc/mntent_r.c
misc/tst-mntent.c