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/CSend.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'plugins/SendScreenshotPlus/src/CSend.cpp') 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; } -- cgit v1.2.3