Răsfoiți Sursa

Merge pull request #738 from kamailio/lazedo-patch-1

presence: fix crash when field value is null
Daniel-Constantin Mierla 9 ani în urmă
părinte
comite
8a87faca2b
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      modules/presence/notify.c

+ 1 - 1
modules/presence/notify.c

@@ -2127,7 +2127,7 @@ error:
 #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)