Author: John Keeping <john@metanate.com>
Fix segmentation fault in empty repository 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>
ui-shared.c | 2 +-
diff --git a/ui-shared.c b/ui-shared.c index 85c20964b1b1f8778022c4aa281caf187fcc738b..3e9282f35c0e032251b26ab00bd7f35e3bb7aee0 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -619,7 +619,7 @@ html("