Paste number 94030: possible null dereference in strcmp

Paste number 94030: possible null dereference in strcmp
Pasted by: zecke
When:2 years, 1 week ago
Share:Tweet this! | http://paste.lisp.org/+20JY
Channel:#webkit-gtk
Paste contents:
Raw Source | XML | Display As
diff --git a/src/bookmarks/ephy-bookmarks-import.c b/src/bookmarks/ephy-bookmarks-import.c
index c50027e..1efdb71 100644
--- a/src/bookmarks/ephy-bookmarks-import.c
+++ b/src/bookmarks/ephy-bookmarks-import.c
@@ -97,7 +97,7 @@ ephy_bookmarks_import (EphyBookmarks *bookmarks,
                success = ephy_bookmarks_import_xbel (bookmarks, filename);
        }
        else if ((type != NULL && strcmp (type, "application/x-mozilla-bookmarks") == 0) ||
-                strcmp (type, "text/html") == 0 ||
+                (type != NULL && strcmp (type, "text/html") == 0) ||
                 strstr (filename, MOZILLA_BOOKMARKS_DIR) != NULL ||
                  strstr (filename, FIREFOX_BOOKMARKS_DIR_0) != NULL ||
                  strstr (filename, FIREFOX_BOOKMARKS_DIR_1) != NULL ||

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.