[glib-networking] tls(g_tls_connection_base_read_message): fix possible NULL dereference



commit 42f8afbb19bfa88371efa5b73ed8a2cfd5150abf
Author: Vladimir D. Seleznev <vseleznv altlinux org>
Date:   Tue Dec 1 18:49:02 2020 +0300

    tls(g_tls_connection_base_read_message): fix possible NULL dereference

 tls/base/gtlsconnection-base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tls/base/gtlsconnection-base.c b/tls/base/gtlsconnection-base.c
index 4e7d5ae..9cf66bb 100644
--- a/tls/base/gtlsconnection-base.c
+++ b/tls/base/gtlsconnection-base.c
@@ -2037,7 +2037,7 @@ g_tls_connection_base_read_message (GTlsConnectionBase  *tls,
       {
         nread = 0;
 
-        for (guint i = 0; i < num_vectors; i++)
+        for (guint i = 0; i < num_vectors && priv->app_data_buf; i++)
           {
             gsize count;
             GInputVector *vec = &vectors[i];


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]