bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Handling null pointers to printf


From: Aaron Stone
Subject: Handling null pointers to printf
Date: Wed, 24 May 2006 02:28:43 -0700

Hi,

When glibc gets a null pointer in one of the printf-family of functions
for a %s argument, it prints "(null)" and doesn't crash. All of the
*BSD's libc's also print "(null)". 

Gnulib, when using its own vasnprintf implementation, does crash. The
principal offender is Solaris, for which a) this would normally crash
their in libc, and b) downstream gnulib consumers prefer to use gnulib
rather than the Solaris printf's on Solaris anyways.

I believe that Gnulib should mimic the Linux and *BSD way of handling
null %s args without crashing.

This patch, submitted to Glib last May, appears to correct this:
http://mail.gnome.org/archives/gtk-devel-list/2005-May/msg00031.html

Thanks,
Aaron





reply via email to

[Prev in Thread] Current Thread [Next in Thread]