added more NULL checks at run-time

This commit is contained in:
Marc Stern
2024-08-14 19:00:25 +02:00
parent 22a6829690
commit 0066a67911
2 changed files with 38 additions and 0 deletions

View File

@@ -12,6 +12,7 @@
* directly using the email address security@modsecurity.org.
*/
#include <assert.h>
#include "msc_geo.h"
@@ -244,6 +245,7 @@ static int field_length(const char *field, int maxlen)
*/
int geo_init(directory_config *dcfg, const char *dbfn, char **error_msg)
{
assert(dcfg != NULL);
*error_msg = NULL;
if ((dcfg->geo == NULL) || (dcfg->geo == NOT_SET_P)) {