dunst
dunst copied to clipboard
NULL pointers passed to *printf
Issue description
Under OpenBSD, a bunch of lines like
8 Mar 4 15:45:23 host dunst: vfprintf %s NULL in "[%16s:%04d] summary %s"
7 Mar 4 15:45:23 host dunst: vfprintf %s NULL in "[%16s:%04d] appname %s"
6 Mar 4 15:45:23 host dunst: vfprintf %s NULL in "[%16s:%04d] script %s"
5 Mar 4 15:45:23 host dunst: vfprintf %s NULL in "[%16s:%04d] frame %s"
are added to /var/log/messages. These appear whenever some program passes NULL to the *printf family of functions in OpenBSD. It seems that those come from settings.c, where the struct members are passed to LOG_D without checking if they are NULL.
Installation info
- Version:
Dunst - A customizable and lightweight notification-daemon 1.9.2 (2023-04-20) - Install type:
package - Window manager / Desktop environment:
dwm - Distro:
OpenBSD-release 7.4
Minimal dunstrc
# Dunstrc here
We rely heavily on printing null strings with the assumption that they will be printed as "(null)". Is there no way to turn off those logs?
The messages are written by syslogd(8), which can only filter them according to log facility and level. Still, I find it shocking that passing NULLs seems to be a practice rather than an oversight.
It is more of an historical artifact. Anyway I checked and it seems ub, so we may want to change that in the near future
@Strahinja if you find that there are some other nulls I forgot to handle feel free to reopen this 👍🏻