From 26249603066a13cdb8cb11b45af8410cd7adb82b Mon Sep 17 00:00:00 2001 From: lazedo Date: Sun, 7 Aug 2016 13:32:50 +0100 Subject: [PATCH] presence: fix crash when field value is null --- modules/presence/notify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/presence/notify.c b/modules/presence/notify.c index 2a9b4d70d75..82ebf6b677b 100644 --- a/modules/presence/notify.c +++ b/modules/presence/notify.c @@ -2127,7 +2127,7 @@ int add_waiting_watchers(watcher_t *watchers, str pres_uri, str event) #define EXTRACT_STRING(strng, chars)\ do {\ strng.s = (char *) chars;\ - strng.len = strlen(strng.s);\ + strng.len = strng.s == NULL ? 0 : strlen(strng.s);\ } while(0); static int unset_watchers_updated_winfo(str *pres_uri)