From: Wilfried Göesgens Date: Thu, 6 May 2010 18:40:08 +0000 (+0000) Subject: * OverrideRequest(): for some reason Hdr->HR.ReqLine can be NULL here, we need to... X-Git-Tag: v7.86~222 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=8418a9aa5f0a111696e35c74ad5453c4734ecbc4 * OverrideRequest(): for some reason Hdr->HR.ReqLine can be NULL here, we need to take care of that. --- diff --git a/webcit/context_loop.c b/webcit/context_loop.c index 34233ef41..1525e91a5 100644 --- a/webcit/context_loop.c +++ b/webcit/context_loop.c @@ -444,8 +444,13 @@ void OverrideRequest(ParsedHttpHdrs *Hdr, const char *Line, long len) { StrBuf *Buf = NewStrBuf(); - FlushStrBuf(Hdr->HR.ReqLine); - StrBufPlain(Hdr->HR.ReqLine, Line, len); + if (Hdr->HR.ReqLine != NULL) { + FlushStrBuf(Hdr->HR.ReqLine); + StrBufPlain(Hdr->HR.ReqLine, Line, len); + } + else { + Hdr->HR.ReqLine = NewStrBufPlain(Line, len); + } ReadHttpSubject(Hdr, Hdr->HR.ReqLine, Buf); FreeStrBuf(&Buf);