diff options
author | Nvinside <Nvinside@eced67a3-f377-a0ae-92ae-d6de1850b05a> | 2011-07-04 17:53:28 +0000 |
---|---|---|
committer | Nvinside <Nvinside@eced67a3-f377-a0ae-92ae-d6de1850b05a> | 2011-07-04 17:53:28 +0000 |
commit | 25955f1de60f3f6692be96b4b5799288c73a876e (patch) | |
tree | 82633c3d30b14c390f810a895ec3033b44fbc28d /MirOTR | |
parent | d0a1961351932253ba9e2311d4611df0a15df906 (diff) |
crashfix patch by the_nic .. thanks
git-svn-id: http://mirotr.googlecode.com/svn/trunk@53 eced67a3-f377-a0ae-92ae-d6de1850b05a
Diffstat (limited to 'MirOTR')
-rw-r--r-- | MirOTR/striphtml.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/MirOTR/striphtml.cpp b/MirOTR/striphtml.cpp index 3262f6d..31eceef 100644 --- a/MirOTR/striphtml.cpp +++ b/MirOTR/striphtml.cpp @@ -77,6 +77,8 @@ void endtag_cb (void *cbdata, ekhtml_string_t *tag) { void data_cb (void *cbdata, ekhtml_string_t *text) {
STRIPHTML_DATA *data = (STRIPHTML_DATA *)cbdata;
+ if(text->len <= 0)
+ return;
char* s = (char*) mir_calloc(text->len+1);
decode_html_entities_utf8(s, text->str, text->len);
|