By default, 'candidate_identifier == NULL' only happens for 'compatibility
== NICE_COMPATIBILITY_GOOGLE'. However, keepalive=true will also trigger
the same code path so candidate_identifier must be checked to avoid a
segfault.
return 0;
}
- if (compatibility == STUN_USAGE_ICE_COMPATIBILITY_MSICE2) {
+ if (compatibility == STUN_USAGE_ICE_COMPATIBILITY_MSICE2 &&
+ candidate_identifier) {
size_t identifier_len = strlen(candidate_identifier);
size_t attribute_len = identifier_len;
int modulo4 = identifier_len % 4;