Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Jan 6, 2011
  1. @drafnel @gitster

    trace.c: ensure NULL is not passed to printf

    drafnel authored gitster committed
    GNU printf, and many others, will print the string "(null)" if a NULL
    pointer is passed as the argument to a "%s" format specifier.  Some
    implementations (like on Solaris) do not detect a NULL pointer and will
    produce a segfault in this case.
    So, fix this by ensuring that pointer variables do not contain the value
    NULL.  Assign the string "(null)" to the variables are NULL.
    Signed-off-by: Brandon Casey <>
    Signed-off-by: Junio C Hamano <>
Something went wrong with that request. Please try again.