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/CSend.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/CSend.cpp')
-rw-r--r-- | plugins/SendScreenshotPlus/src/CSend.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/SendScreenshotPlus/src/CSend.cpp b/plugins/SendScreenshotPlus/src/CSend.cpp index a2f8e51beb..f0c800004e 100644 --- a/plugins/SendScreenshotPlus/src/CSend.cpp +++ b/plugins/SendScreenshotPlus/src/CSend.cpp @@ -454,9 +454,12 @@ void CSend::Exit(unsigned int Result) { const char* CSend::GetHTMLContent(char* str, const char* startTag, const char* endTag) { char* begin=strstr(str,startTag); if(!begin) return NULL; - begin+=strlen(startTag); - char* end=strstr(begin,endTag); - if(end) *end=0; + begin+=strlen(startTag)-1; + for(; *begin!='>' && *begin; ++begin); + if(*begin){ + char* end=strstr(++begin,endTag); + if(end) *end=0; + } return begin; } |