lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <7e6ec700d812d9d3a8d2ec6a621118dad2f8e9dd.camel@talbothome.com>
Date:   Fri, 26 Mar 2021 06:50:52 -0400
From:   Christopher Talbot <chris@...bothome.com>
To:     netdev@...r.kernel.org
Subject: [PATCH 4/9] Fix issue if there is an empty string in encoded text


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ