segfault on empty property strings
Try to run PIPEWIRE_PROPS= pw-jack carla
several times.
Eventually you will get a segfault.
pw_properties_new_string()
which in turn calls pw_properties_update_string()
needs to handle empty strings and not crash.
Partial backtrace:
Core was generated by `/usr/bin/python3 /usr/share/carla/carla --with-appname=/usr/bin/carla --with-li'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007fb619229491 in spa_json_enter_container (type=123 '{', sub=0x7ffd0428cac0, iter=0x7ffd0428caa0) at ../spa/include/spa/utils/json.h:179
179 if (spa_json_next(iter, &value) <= 0 || *value != type)
[Current thread is 1 (Thread 0x7fb6332aa740 (LWP 244939))]
Missing separate debuginfos, use: dnf debuginfo-install python3-3.9.1-1.fc33.x86_64
(gdb) bt
#0 0x00007fb619229491 in spa_json_enter_container (type=123 '{', sub=0x7ffd0428cac0, iter=0x7ffd0428caa0) at ../spa/include/spa/utils/json.h:179
#1 spa_json_enter_object (sub=0x7ffd0428cac0, iter=0x7ffd0428caa0) at ../spa/include/spa/utils/json.h:206
#2 pw_properties_update_string (props=0x7ffd0428caa0, props@entry=0x564db68e8380, str=str@entry=0x7ffd042904cd "", size=<optimized out>) at ../src/pipewire/properties.c:157
#3 0x00007fb619229852 in pw_properties_new_string (object=0x7ffd042904cd "") at ../src/pipewire/properties.c:208
#4 0x00007fb61bb26c74 in jack_client_open (client_name=0x564db64767a0 "Carla", options=JackNoStartServer, status=0x0) at ../pipewire-jack/src/pipewire-jack.c:2476