fts: avoid crash when a cycle is added while traversing 01/201501/1 accepted/tizen_5.0_base tizen_5.0_base accepted/tizen/5.0/base/20190318.110749 submit/tizen_5.0_base/20190315.082133
authorKamil Dudka <kdudka@redhat.com>
Wed, 11 Feb 2015 17:41:43 +0000 (18:41 +0100)
committerHyunjee Kim <hj0426.kim@samsung.com>
Fri, 15 Mar 2019 04:46:31 +0000 (13:46 +0900)
commiteac378cb97d8784054a37c8821e6c8da2ef3bbc3
tree152829760d9f5c3c4bde38ce9fb315dad0c1460a
parentcb817dda45e12bf102f43867ef7294690ae2f10d
fts: avoid crash when a cycle is added while traversing

This could be triggered by auto-mounting a recursive bind mount.
Reported by Michael Chapman in: https://bugzilla.redhat.com/1188498
* lib/fts.c (fts_read): Avoid removing the original hash table item
when leaving a directory that caused a cycle, and preserve the FTS_DC
flag.

Change-Id: I24bfd7a2f46197ec8dff5ddabca3cab3837b28be
Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
gnulib/lib/fts.c