#1086002 Segmentation fault

Package:
yad
Source:
yad
Description:
tool for creating graphical dialogs from shell scripts
Submitter:
Michael Deegan
Date:
2024-10-24 15:39:02 UTC
Severity:
normal
#1086002#5
Date:
2024-10-24 15:36:48 UTC
From:
To:
When attempting an example from the manpage: yad --icons --read-dir=/usr/share/applications

  (gdb) bt
  #0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:76
  #1  0x0000555555571dfe in parse_desktop_file (filename=0x555555933a00 "/usr/share/applications/qemu.desktop") at ./src/icons.c:333
  #2  read_dir () at ./src/icons.c:408
  #3  0x00005555555721ea in icons_create_widget (dlg=dlg@entry=0x5555556a9280) at ./src/icons.c:500
  #4  0x000055555557f133 in create_layout (dlg=dlg@entry=0x5555556a9280) at ./src/main.c:244
  #5  0x000055555556a520 in create_dialog () at ./src/main.c:390
  #6  main (argc=<optimized out>, argv=<optimized out>) at ./src/main.c:863

Version 0.40.0-1+b1 also behaves identically.

Surely it's not as idiotic a bug as failing to ensure that
g_key_file_get_string() returns non-NULL?

FWIW qemu.desktop looks like this:

  [Desktop Entry]
  Version=1.0
  Name=QEMU
  Icon=qemu
  Type=Application
  Terminal=false
  Keywords=Emulators;Virtualization;KVM;
  NoDisplay=true

Yes, the missing 'Exec' key violates the Freedesktop spec, however the qemu
maintainers (in #1040378) seem to think this is fine. Either way, yad should
still not crash in the face of mildly malformed input.