From: Christopher Talbot <chris@talbothome.com>
To: ofono@ofono.org
Subject: [PATCH 4/9] Fix issue if there is an empty string in encoded text
Date: Wed, 24 Feb 2021 19:45:26 -0500 [thread overview]
Message-ID: <799fae706773af11b74f9e11d1c8b264b7642a0a.camel@talbothome.com> (raw)
In-Reply-To: <20210225003933.2871.63570@ml01.vlan13.01.org>
[-- Attachment #1: Type: text/plain, Size: 724 bytes --]
A swedish carrier sends an empty string in the subject line. This
patch allows mmsd to handle it
---
src/mmsutil.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/mmsutil.c b/src/mmsutil.c
index 9430bf1..615198f 100644
--- a/src/mmsutil.c
+++ b/src/mmsutil.c
@@ -297,6 +297,13 @@ static gboolean extract_encoded_text(struct
wsp_header_iter *iter, void *user)
p = wsp_header_iter_get_val(iter);
l = wsp_header_iter_get_val_len(iter);
+ if(l == 0) {
+ DBG("Length is 0! Returning empty string");
+ dec_text = g_strdup("");
+ *out = dec_text;
+ return TRUE;
+ }
+
switch (wsp_header_iter_get_val_type(iter)) {
case WSP_VALUE_TYPE_TEXT:
/* Text-string */
--
2.30.0
next prev parent reply other threads:[~2021-02-25 0:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-25 0:39 Patches For MMSD chris
2021-02-25 0:42 ` [PATCH 1/9] Fix mmsd to work with T-mobile Christopher Talbot
2021-02-25 0:43 ` [PATCH 2/9] Ensure Compatibility with Telus Canada Christopher Talbot
2021-02-25 0:44 ` [PATCH 3/9] Ensure Compatibility with AT&T Christopher Talbot
2021-02-25 0:45 ` Christopher Talbot [this message]
2021-02-25 0:46 ` [PATCH 5/9] Allow for a user configurable maximum attachment size Christopher Talbot
2021-02-25 0:46 ` [PATCH 6/9] Update README Christopher Talbot
2021-02-25 0:47 ` [PATCH 7/9] Fix Draft and Sent Bugs Christopher Talbot
2021-02-25 0:48 ` [PATCH 8/9] Allow Maintainer mode to compile without -WError Christopher Talbot
2021-02-25 0:50 ` [PATCH 9/9] Add a Modem Manager Plugin Christopher Talbot
2021-03-26 10:50 [PATCH 4/9] Fix issue if there is an empty string in encoded text Christopher Talbot
2021-04-10 14:13 [PATCH 0/9] Updates for mmsd Chris Talbot
2021-04-10 14:17 ` [PATCH 1/9] Fix mmsd to work with T-mobile Chris Talbot
2021-04-10 14:20 ` [PATCH 2/9] Ensure Compatibility with Telus Canada Chris Talbot
2021-04-10 14:20 ` [PATCH 3/9] Ensure Compatibility with AT&T Chris Talbot
2021-04-10 14:21 ` [PATCH 4/9] Fix issue if there is an empty string in encoded text Chris Talbot
2021-04-10 14:21 ` Chris Talbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=799fae706773af11b74f9e11d1c8b264b7642a0a.camel@talbothome.com \
--to=chris@talbothome.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.