de->de_directory may be null. htsmsg_add_str passes str unchecked to underlying strlen function. __strlen_avx2 will segfault if str is null.
htsmsg_add_str2 checks the value of args before passing them to htsmsg_add_str, which should prevent this.
Fixes #1712
htsmsg_add_str2(conf, "owner", de->de_owner);
htsmsg_add_str2(conf, "creator", de->de_creator);
htsmsg_add_str(conf, "comment", buf);
- htsmsg_add_str(conf, "directory", de->de_directory);
+ htsmsg_add_str2(conf, "directory", de->de_directory);
de2 = dvr_entry_create_from_htsmsg(conf, e);
htsmsg_destroy(conf);