From e39e6974297e7031bd2f9fc2ecc0abb94b3caa87 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Tue, 24 Jul 2012 12:20:32 +0200 Subject: [PATCH] Check if subset calculation actually yields a TS in Unity narrowing --- src/libcharon/plugins/unity/unity_narrow.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libcharon/plugins/unity/unity_narrow.c b/src/libcharon/plugins/unity/unity_narrow.c index dada26dc6..a5fcfabc7 100644 --- a/src/libcharon/plugins/unity/unity_narrow.c +++ b/src/libcharon/plugins/unity/unity_narrow.c @@ -53,7 +53,11 @@ METHOD(listener_t, narrow, bool, { /* got one, replace original TS */ remote->remove_first(remote, (void**)&orig); } - remote->insert_last(remote, orig->get_subset(orig, current)); + current = orig->get_subset(orig, current); + if (current) + { + remote->insert_last(remote, current); + } } enumerator->destroy(enumerator); if (orig)