* Be extra careful with zero termination of the foreign update status string

* Always include Wininet.h


git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6605 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2015-09-10 12:05:50 +00:00
parent 873e860f57
commit fed52fac19

View file

@ -2,6 +2,7 @@
#include "makensisw.h"
#include "update.h"
#include <Wininet.h>
#include "utils.h" // OpenUrlInDefaultBrowser
#define mbtitle "NSIS Update"
@ -78,9 +79,9 @@ static DWORD CALLBACK UpdateCheckWebrequestThread(LPVOID ThreadParam)
gle = GetLastError();
if (hConn)
{
char response[30];
char response[30+1];
DWORD cbRecv;
gle = InetSynchronousReadFile(hConn, response, sizeof(response), &cbRecv);
gle = InetSynchronousReadFile(hConn, response, sizeof(response)-1, &cbRecv);
if (!gle)
{
response[cbRecv] = '\0';