If VRT_error is called with reason==NULL, WSL() will eventually call
strlen(0), which will cause a SIGSEGV on (Open)Solaris. Fix this by
checking if the reason is empty and just use (null) in that case.
Fixes: 458
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3847
d4fa192b-c00b-0410-8231-
f00ffab90ce4
{
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
- WSL(sp->wrk, SLT_Debug, 0, "VCL_error(%u, %s)", code, reason);
+ WSL(sp->wrk, SLT_Debug, 0, "VCL_error(%u, %s)", code, reason ?
+ reason : "(null)");
sp->err_code = code ? code : 503;
sp->err_reason = reason ? reason : http_StatusMessage(sp->err_code);
}