fts: avoid crash when a cycle is added while traversing 03/201503/1 accepted/tizen_5.5_base accepted/tizen_5.5_base_mobile_hotfix accepted/tizen_5.5_base_wearable_hotfix accepted/tizen_6.0_base_tool_hotfix tizen_5.5_base tizen_5.5_base_mobile_hotfix tizen_5.5_base_wearable_hotfix tizen_5.5_tv tizen_6.0_base_hotfix accepted/tizen/5.5/base/20191030.081539 accepted/tizen/5.5/base/mobile/hotfix/20201023.084044 accepted/tizen/5.5/base/wearable/hotfix/20201023.080440 accepted/tizen/6.0/base/20201029.110023 accepted/tizen/6.0/base/tool/20201029.111711 accepted/tizen/6.0/base/tool/hotfix/20201030.124519 accepted/tizen/6.0/base/tool/hotfix/20201102.085635 accepted/tizen/base/20190324.220427 submit/tizen_5.5_base/20191030.000001 submit/tizen_5.5_base_mobile_hotfix/20201023.171502 submit/tizen_5.5_base_wearable_hotfix/20201023.155602 submit/tizen_6.0_base/20201029.184802 submit/tizen_6.0_base_hotfix/20201030.192502 submit/tizen_6.0_base_hotfix/20201102.162702 submit/tizen_base/20190315.082104 submit/tizen_base/20201207.055733 submit/tizen_base/20201208.051231 submit/tizen_base/20201208.051733 tizen_5.5.m2_release tizen_6.0.m2_release
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:47:15 +0000 (04:47 +0000)
commit7ead692bcf0e3aacd3eb9ff0a14811a9122c5c57
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