From 396899bb8e29682d198674e18813b577a93201f5 Mon Sep 17 00:00:00 2001 From: szaka Date: Sun, 15 Jul 2007 22:14:14 +0000 Subject: [PATCH] ntfs_attr_pwrite: fix missing error handling --- libntfs-3g/attrib.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libntfs-3g/attrib.c b/libntfs-3g/attrib.c index 3f03f300..69d98dd8 100644 --- a/libntfs-3g/attrib.c +++ b/libntfs-3g/attrib.c @@ -1276,7 +1276,13 @@ done: ntfs_attr_put_search_ctx(ctx); /* Update mapping pairs if needed. */ if (update_from != -1) - ntfs_attr_update_mapping_pairs(na, 0 /*update_from*/); + if (ntfs_attr_update_mapping_pairs(na, 0 /*update_from*/)) { + /* + * FIXME: trying to recover by goto rl_err_out; + * could cause driver hang by infinite looping. + */ + return -1; + } out: return total; rl_err_out: