Module: kamailio Branch: master Commit: 8a87faca2b88fa390bf6bf4dca88ed8c85376783 URL: https://github.com/kamailio/kamailio/commit/8a87faca2b88fa390bf6bf4dca88ed8c...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: GitHub noreply@github.com Date: 2016-08-08T08:47:17+02:00
Merge pull request #738 from kamailio/lazedo-patch-1
presence: fix crash when field value is null
---
Modified: modules/presence/notify.c
---
Diff: https://github.com/kamailio/kamailio/commit/8a87faca2b88fa390bf6bf4dca88ed8c... Patch: https://github.com/kamailio/kamailio/commit/8a87faca2b88fa390bf6bf4dca88ed8c...
---
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)