Selaa lähdekoodia

presence: fix crash when field value is null

lazedo 9 vuotta sitten
vanhempi
commit
2624960306
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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)