From c07d7e7ec4920ad0a83a7bc52d7d19ac70141c26 Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Tue, 9 Jun 2009 22:35:32 +0000 Subject: [PATCH] * Make the HTTP request struct point to realloc'd memory locations where necessary. --- upnphttp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/upnphttp.c b/upnphttp.c index 323d91d..2428e5c 100644 --- a/upnphttp.c +++ b/upnphttp.c @@ -161,7 +161,7 @@ ParseHttpHeaders(struct upnphttp * h) else if(strncasecmp(line, "SID", 3)==0) { //zqiu: fix bug for test 4.0.5 - //Skip the extra header like "SIDHEADER: xxxxxx xxx" + //Skip extra headers like "SIDHEADER: xxxxxx xxx" for(p=line+3;preq_buflen += n; if((h->req_buflen - h->req_contentoff) >= h->req_contentlen) { + /* Need the struct to point to the realloc'd memory locations */ + ParseHttpHeaders(h); if( h->state == 1 ) ProcessHTTPPOST_upnphttp(h); else if( h->state == 2 )