diff options
author | Nalin Dahyabhai <nalin@dahyabhai.net> | 2008-06-21 13:44:17 -0400 |
---|---|---|
committer | Nalin Dahyabhai <nalin@dahyabhai.net> | 2008-06-21 13:44:17 -0400 |
commit | 96a2fc8a22faec046ab34f3b72e009ef812a6747 (patch) | |
tree | b2f108271e1f86be39ab3af88c1bd2b366fd9fa9 | |
parent | 955f661c7f9e98a6296002e6e8c6e900092b8e92 (diff) | |
download | slapi-nis-96a2fc8a22faec046ab34f3b72e009ef812a6747.tar.gz slapi-nis-96a2fc8a22faec046ab34f3b72e009ef812a6747.tar.xz slapi-nis-96a2fc8a22faec046ab34f3b72e009ef812a6747.zip |
- don't fail map_next() when there's no next entry before verifying that there
are still keys left in this entry
-rw-r--r-- | src/map.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -498,7 +498,7 @@ map_next(struct plugin_state *state, return FALSE; } entry = map_data_find_map_entry(state, map, prev_len, prev); - if ((entry == NULL) || (entry->next == NULL)) { + if (entry == NULL) { return FALSE; } *secure = map->secure; @@ -514,6 +514,9 @@ map_next(struct plugin_state *state, *next_value_len = entry->value_len; *next_value = entry->value; } else { + if (entry->next == NULL) { + return FALSE; + } *next_key_len = entry->next->key_len[0]; *next_key = entry->next->keys[0]; *next_value_len = entry->next->value_len; |