After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 379365 - Do not printf NULL string pointers
Do not printf NULL string pointers
Status: RESOLVED FIXED
Product: bonobo
Classification: Deprecated
Component: libbonoboui
CVS HEAD
Other Windows
: Normal normal
: ---
Assigned To: Michael Meeks
bonobo qa
Depends on:
Blocks:
 
 
Reported: 2006-11-26 04:23 UTC by Andreas Köhler
Modified: 2006-12-14 09:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use "" if i->item->name is NULL (1.31 KB, patch)
2006-11-26 04:24 UTC, Andreas Köhler
none Details | Review

Description Andreas Köhler 2006-11-26 04:23:35 UTC
On Solaris and Windows calling printf("%s", NULL) makes the app crash, but this is what bonobo-dock-layout.c does in certain circumstances. Please see the attached patch.
Comment 1 Andreas Köhler 2006-11-26 04:24:24 UTC
Created attachment 77151 [details] [review]
Use "" if i->item->name is NULL
Comment 2 Kjartan Maraas 2006-12-09 19:13:24 UTC
Are you sure this shouldn't be handled in g_strdup_printf() itself? I had the impression that g_strdup() and friends should handle NULL?
Comment 3 Andreas Köhler 2006-12-10 11:04:42 UTC
Sorry for the typo in comment 0, i mean g_printf, of course :)

I am following
http://mail.gnome.org/archives/gtk-devel-list/2005-May/msg00033.html,
https://lists.gnucash.org/pipermail/gnucash-devel/2006-August/018475.html and bug 361428 here. So although I would like these functions to be robust, I do not expect a change in the foreseeable future.
Comment 4 Kjartan Maraas 2006-12-14 09:23:14 UTC
Ok. Commited.