diff options
author | Vijaykumar koppad <vijaykumar.koppad@gmail.com> | 2013-03-26 17:42:32 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-03-27 11:03:28 -0700 |
commit | 1f7dadccd45863ebea8f60339f297ac551e89899 (patch) | |
tree | 7cdcd31d2935955324bc7ad82506a2c827f4f2a4 /libglusterfs/src/dict.c | |
parent | 87d03fa7f48af6500cb8277db96ee7f6c690ea1c (diff) |
libglusterfs/dict: fix infinite loop in dict_keys_join()
- missing "pairs = next" caused infinite loop
Change-Id: I9171be5bec051de6095e135d616534ab49cd4797
BUG: 905871
Signed-off-by: Vijaykumar Koppad <vijaykumar.koppad@gmail.com>
Reviewed-on: http://review.gluster.org/4723
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'libglusterfs/src/dict.c')
-rw-r--r-- | libglusterfs/src/dict.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libglusterfs/src/dict.c b/libglusterfs/src/dict.c index a8cdeaf28f8..72dd7e7aada 100644 --- a/libglusterfs/src/dict.c +++ b/libglusterfs/src/dict.c @@ -1180,8 +1180,10 @@ dict_keys_join (void *value, int size, dict_t *dict, while (pairs) { next = pairs->next; - if (filter_fn && filter_fn (pairs->key)) - continue; + if (filter_fn && filter_fn (pairs->key)){ + pairs = next; + continue; + } if (value && (size > len)) strncpy (value + len, pairs->key, size - len); |