]> gitweb.ps.run Git - ps-cgit/commitdiff
Fix segmentation fault in empty repository
authorJohn Keeping <john@metanate.com>
Thu, 24 Nov 2011 11:54:47 +0000 (11:54 +0000)
committerLars Hjemli <hjemli@gmail.com>
Tue, 3 Jan 2012 21:00:30 +0000 (21:00 +0000)
When a repository is empty, the ATOM feed link is written in the header,
but this involves formatting ctx->qry.head which is NULL in this case.
With glibc, vsnprintf formats "%s" with a NULL input as "(null)" but on
Solaris this results in a segmentation fault.  Since we don't have a
meaningful head for the atom feed in an empty repository, it's simplest
not to write out the link element at all.

Signed-off-by: John Keeping <john@metanate.com>

No differences found