summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@redhat.com>2010-11-18 15:16:19 -0500
committerNalin Dahyabhai <nalin@redhat.com>2010-11-18 15:16:19 -0500
commit862a6daab42cb469e55294fe26955b5bf6a5b3e7 (patch)
tree4a8d24b5c52b3a7258768c74439d5904ff960ad0
parenta9fbf6e170ab033c3c73d8846f11ac6b575cf889 (diff)
downloadslapi-nis-862a6daab42cb469e55294fe26955b5bf6a5b3e7.tar.gz
slapi-nis-862a6daab42cb469e55294fe26955b5bf6a5b3e7.tar.xz
slapi-nis-862a6daab42cb469e55294fe26955b5bf6a5b3e7.zip
- don't walk off the end of the filter array, but expect it to be of the
right length
-rw-r--r--src/format.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/format.c b/src/format.c
index 4195b8a..b3588f7 100644
--- a/src/format.c
+++ b/src/format.c
@@ -360,7 +360,7 @@ format_add_ref_attr_list(struct format_ref_attr_list ***list,
format_free_ref_attr_list(ret);
return NULL;
}
- if ((filters != NULL) && (filters[j] != NULL)) {
+ if ((filters != NULL) && (j < ret[i]->n_links - 1)) {
ftmp = strdup(filters[j]);
if (ftmp == NULL) {
format_free_ref_attr_list(ret);