[epiphany] notebook: Check limit before dereferencing



commit dfaf08c914edff8ff291a2d4a01ac37315bb90d6
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Sun Jul 2 11:59:09 2017 -0500

    notebook: Check limit before dereferencing

 src/ephy-notebook.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index c95f04f..333cb5f 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -308,7 +308,7 @@ notebook_drag_data_received_cb (GtkWidget        *widget,
     if (uris == NULL)
       return;
 
-    for (i = 0; uris[i] != NULL && i < INSANE_NUMBER_OF_URLS; i++) {
+    for (i = 0; i < INSANE_NUMBER_OF_URLS && uris[i] != NULL; i++) {
       embed = ephy_link_open (EPHY_LINK (notebook), uris[i], embed,
                               (embed && i == 0) ? 0 : EPHY_LINK_NEW_TAB);
     }


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