[gst-devel] printf ("%s", NULL)

Benjamin Otte in7y118 at public.uni-hamburg.de
Thu May 1 09:36:01 CEST 2003


Hi people,

I just found out that printf ("%s", NULL) segfaults on Solaris. And since
g_print uses that implementation and the standard says it must not be
NULL, GStreamer mustn't use it either. That's especially troublesome for
all our GST_INFO and GST_DEBUG statements. I've added a macro
#define GST_STR_NULL(str) ((str) ? (str) : "(NULL)")
to gstinfo.h that should be used when strings might be NULL but must not
be and I've asked Brain ameron (our solaris guy) to run some --gst-mask=-1
pipelines to catch some of those errors.

So if you know of any such cases, please make sure to use the macro.

I've already fixed one such occurance in the initialization code of
GStreamer.


Benjamin





More information about the gstreamer-devel mailing list