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>
This commit is contained in:
parent
87d03fa7f4
commit
1f7dadccd4
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user