Commit 19eed6d8 authored by Avinash Sonawane's avatar Avinash Sonawane Committed by Andre Miranda

Make sure that argument passed to strncmp is non-NULL (!1)

parent 17400e5a
Pipeline #1487 passed with stages
in 1 minute and 15 seconds
...@@ -763,7 +763,7 @@ cb_rstto_read_file ( gpointer user_data ) ...@@ -763,7 +763,7 @@ cb_rstto_read_file ( gpointer user_data )
/* Add file to the list */ /* Add file to the list */
content_type = g_file_info_get_content_type (file_info); content_type = g_file_info_get_content_type (file_info);
if (strncmp (content_type, "image/", 6) == 0) if (content_type && (strncmp (content_type, "image/", 6) == 0))
{ {
filename = g_file_info_get_name (file_info); filename = g_file_info_get_name (file_info);
child_file = g_file_get_child (loader->dir, filename); child_file = g_file_get_child (loader->dir, filename);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment