diff options
author | René Schümann <white06tiger@gmail.com> | 2014-06-08 01:10:33 +0000 |
---|---|---|
committer | René Schümann <white06tiger@gmail.com> | 2014-06-08 01:10:33 +0000 |
commit | 5baafa881a2ec9206eeac155fe4bfc0659c2af5c (patch) | |
tree | 59743f445501e2b55581a3d28bd8e0228a39f819 /plugins/SendScreenshotPlus/src/CSendImageShack.cpp | |
parent | 5f22034a2628515959a190a22b057512e0fa75a4 (diff) |
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
Diffstat (limited to 'plugins/SendScreenshotPlus/src/CSendImageShack.cpp')
-rw-r--r-- | plugins/SendScreenshotPlus/src/CSendImageShack.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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,"<image_link>","</image_link>"); if(url && *url){ |