<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 11, 2017 at 11:32 AM, Ben Chan <span dir="ltr"><<a href="mailto:benchan@chromium.org" target="_blank">benchan@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This patch fixes a potential NULL referenece issue in<br>
mm_sms_properties_get_data() where it accesses `self->priv->data->data'<br>
when `self->priv->data' could be potentially NULL.<br>
---<br>
 libmm-glib/mm-sms-properties.c | 5 ++++-<br>
 1 file changed, 4 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/libmm-glib/mm-sms-<wbr>properties.c b/libmm-glib/mm-sms-<wbr>properties.c<br>
index da4aa804..d66e0dab 100644<br>
--- a/libmm-glib/mm-sms-<wbr>properties.c<br>
+++ b/libmm-glib/mm-sms-<wbr>properties.c<br>
@@ -157,7 +157,10 @@ mm_sms_properties_get_data (MMSmsProperties *self,<br>
 {<br>
     g_return_val_if_fail (MM_IS_SMS_PROPERTIES (self), NULL);<br>
<br>
-    if (self->priv->data && data_len)<br>
+    if (!self->priv->data)<br></blockquote><div><br></div><div>We should probably set *data_len = 0 (if data_len is provided) in this case as well. WDYT?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+        return NULL;<br>
+<br>
+    if (data_len)<br>
         *data_len = self->priv->data->len;<br>
<br>
     return self->priv->data->data;<br>
<span class="gmail-HOEnZb"><font color="#888888">--<br>
2.14.0.434.g98096fd7a8-goog<br>
<br>
______________________________<wbr>_________________<br>
ModemManager-devel mailing list<br>
<a href="mailto:ModemManager-devel@lists.freedesktop.org">ModemManager-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/modemmanager-<wbr>devel</a><br>
</font></span></blockquote></div><br></div></div>