]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11721 fix data length of stripped html
authorSeven Du <dujinfang@x-y-t.cn>
Wed, 24 Apr 2019 09:21:26 +0000 (17:21 +0800)
committerAndrey Volk <andywolk@gmail.com>
Wed, 17 Jul 2019 19:26:05 +0000 (23:26 +0400)
src/mod/endpoints/mod_sofia/mod_sofia.c

index 37d82c05b3e958452f149a8abdab2831c72c0f75..79466dc57ecc858d745b5a5eb1c3b61097c1d500 100644 (file)
@@ -1045,7 +1045,7 @@ static switch_status_t sofia_read_text_frame(switch_core_session_t *session, swi
                        if (msrp_h_content_type && !strcasecmp(msrp_h_content_type, "message/cpim")) {
                                char *stripped_text = switch_html_strip((char *)rframe->data);
                                memcpy(rframe->data, stripped_text, strlen(stripped_text)+1);
-                               rframe->datalen = strlen(stripped_text)+1;
+                               rframe->datalen = strlen(stripped_text);
                                free(stripped_text);
                        }