Tooltip "Bookmark '(null)' cannot be removed" in "Open File..." dialog
I'm using gtk+2-2.24.32 on OpenBSD 6.3 -current.
In the File Open... dialog in various applications (pidgin, gimp and others), apparently there is no bookmark selected when the dialog is first displayed. When hovering with the mouse over the minus sign for removing bookmarks, the tooltip contains Bookmark '(null)' cannot be removed
. See the attached screen shot of the File open dialog
Clearly, name
can be NULL
on line 2827 of gtk/gtkfilechooserdefault.c
:
tip = g_strdup_printf (_("Bookmark '%s' cannot be removed"), name);
Note that printf("%s", NULL);
traditionally prints (null)
. However, this is undefined behavior per Posix's description of the %s
format specifier: "The argument shall be a pointer to an array of char. [...] If the precision is not specified or is greater than the size of the array, the application shall ensure that the array contains a null byte".
I would suggest to set the tooltip to an appropriate generic string, such as "Remove selected bookmark".