diff options
Diffstat (limited to 'MirOTR/striphtml.cpp')
-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);
|