From 418ecfb85b58d140aa9c786d837b27d79d3187ce Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Thu, 15 Oct 2015 17:47:04 +0300 Subject: [PATCH 1/1] Check NULL value pairs. --- projects/rlm_stg/rlm_stg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/rlm_stg/rlm_stg.c b/projects/rlm_stg/rlm_stg.c index 50654593..84df4e7b 100644 --- a/projects/rlm_stg/rlm_stg.c +++ b/projects/rlm_stg/rlm_stg.c @@ -57,9 +57,11 @@ static size_t toVPS(const STG_PAIR* pairs, VALUE_PAIR** vps) while (!emptyPair(pair)) { VALUE_PAIR* vp = pairmake(pair->key, pair->value, T_OP_SET); - pairadd(vps, vp); + if (vp != NULL) { + pairadd(vps, vp); + ++count; + } ++pair; - ++count; } return count; -- 2.44.2