From 5baafa881a2ec9206eeac155fe4bfc0659c2af5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Sch=C3=BCmann?= Date: Sun, 8 Jun 2014 01:10:33 +0000 Subject: SendSS: ! fixed possible crash (CSendHost_uploadpie, CSendImageShack) * improved ImageShack error handling by improving GetHTMLContent * improved uploadpie error handling (still ugly, but better non the less) git-svn-id: http://svn.miranda-ng.org/main/trunk@9421 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SendScreenshotPlus/src/CSendImageShack.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/SendScreenshotPlus/src/CSendImageShack.cpp') diff --git a/plugins/SendScreenshotPlus/src/CSendImageShack.cpp b/plugins/SendScreenshotPlus/src/CSendImageShack.cpp index c12eed48fe..9bd0ef0e0f 100644 --- a/plugins/SendScreenshotPlus/src/CSendImageShack.cpp +++ b/plugins/SendScreenshotPlus/src/CSendImageShack.cpp @@ -72,8 +72,8 @@ void CSendImageShack::SendThread() { NETLIBHTTPREQUEST* reply=(NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)hNetlibUser, (LPARAM)&m_nlhr); HTTPFormDestroy(&m_nlhr); if(reply){ - if(reply->resultCode>=200 && reply->resultCode<300){ - reply->pData[reply->dataLength]='\0';/// make sure its null terminated + if(reply->resultCode>=200 && reply->resultCode<300 && reply->dataLength){ + reply->pData[reply->dataLength-1]='\0';/// make sure its null terminated const char* url=NULL; url=GetHTMLContent(reply->pData,"",""); if(url && *url){ -- cgit v1.2.3