Description
I'm seeing a test case (test_ldap) for the adcli-0.9.2 Fedora package segfaulting with current main (342c8db). I've bisected the failure to commit 7954a05
The backtrace for the segfault is:
#0 0x00007eff72a6c65c in __strlen_evex () from /lib64/libc.so.6
#1 0x00007eff7299a1a3 in strdup () from /lib64/libc.so.6
#2 0x0000555b19a7095a in seq_dup (sequence=0x7ffe96d9bd40, length=<optimized out>, copy=<optimized out>)
at /root/rpmbuild/BUILD/adcli-0.9.2-build/adcli-0.9.2/library/seq.c:323
#3 _adcli_strv_dup (strv=<optimized out>) at /root/rpmbuild/BUILD/adcli-0.9.2-build/adcli-0.9.2/library/adutil.c:171
#4 _adcli_ldap_mod_new (mod_op=0, values=0x7ffe96d9bd40, type=<optimized out>) at adldap.c:396
#5 _adcli_ldap_mod_new1 (mod_op=0, type=<optimized out>, value=<optimized out>) at adldap.c:409
#6 test_new1 () at adldap.c:491
#7 0x0000555b19a71bf9 in test_run (argc=<optimized out>, argv=<optimized out>) at test.c:231
#8 0x00007eff72915248 in __libc_start_call_main () from /lib64/libc.so.6
#9 0x00007eff7291530b in __libc_start_main_impl () from /lib64/libc.so.6
#10 0x0000555b19a70315 in _start ()
The source code for the project is here
It seems like it could be a case of UB, but I'm not sure. What other information would be helpful for reproducing?