From: Shivani Bhardwaj Date: Mon, 3 Aug 2020 16:43:59 +0000 (+0530) Subject: datasets: fix null pointer deref X-Git-Tag: suricata-6.0.0-beta1~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9a637d8541cd91373dcc042c93933f0686b5499;p=thirdparty%2Fsuricata.git datasets: fix null pointer deref --- diff --git a/src/datasets.c b/src/datasets.c index 9104ef2e99..64c6b9c033 100644 --- a/src/datasets.c +++ b/src/datasets.c @@ -538,7 +538,7 @@ static bool DatasetIsStatic(const char *save, const char *load) /* A set is static if it does not have any dynamic properties like * save and/or state defined but has load defined. * */ - if ((load != NULL || strlen(load) > 0) && + if ((load != NULL && strlen(load) > 0) && (save == NULL || strlen(save) == 0)) { return true; }