* Use an asprintf wrapper, to report errors and NULLify the result.

This commit is contained in:
Justin Maggard
2012-03-14 17:57:21 +00:00
parent c9d979886b
commit cabbd0b1de
10 changed files with 77 additions and 53 deletions

View File

@ -84,6 +84,12 @@ BuildSendAndCloseSoapResp(struct upnphttp * h,
"</s:Body>"
"</s:Envelope>\r\n";
if (!body || bodylen < 0)
{
Send500(h);
return;
}
BuildHeader_upnphttp(h, 200, "OK", sizeof(beforebody) - 1
+ sizeof(afterbody) - 1 + bodylen );