ast_multicast_rtp_create_options now checks for NULL or empty options
Change-Id: Ib845eae46a67a9787e89a87ebd1027344e5e0362
mcast_options = ast_calloc(1, sizeof(*mcast_options)
+ strlen(type)
- + strlen(options) + 2);
+ + strlen(S_OR(options, "")) + 2);
if (!mcast_options) {
return NULL;
}
mcast_options->type = pos;
pos += strlen(type) + 1;
- /* Safe */
- strcpy(pos, options);
+ if (!ast_strlen_zero(options)) {
+ strcpy(pos, options); /* Safe */
+ }
mcast_options->options = pos;
if (ast_app_parse_options(multicast_rtp_options, &mcast_options->opts,