Module: kamailio Branch: master Commit: 26249603066a13cdb8cb11b45af8410cd7adb82b URL: https://github.com/kamailio/kamailio/commit/26249603066a13cdb8cb11b45af8410c...
Author: lazedo luis.azedo@factorlusitano.com Committer: GitHub noreply@github.com Date: 2016-08-07T13:32:50+01:00
presence: fix crash when field value is null
---
Modified: modules/presence/notify.c
---
Diff: https://github.com/kamailio/kamailio/commit/26249603066a13cdb8cb11b45af8410c... Patch: https://github.com/kamailio/kamailio/commit/26249603066a13cdb8cb11b45af8410c...
---
diff --git a/modules/presence/notify.c b/modules/presence/notify.c index 2a9b4d7..82ebf6b 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)