Ticket #2039: 2039-retcheck-in-lib-skin-ini-file.c.patch

File 2039-retcheck-in-lib-skin-ini-file.c.patch, 708 bytes (added by vit_r, 15 years ago)

retcheck of g_path_get_basename (mc_skin->name);

  • lib/skin/ini-file.c

    From c661fd15389d3af083dc3bdd20c00ec295f4a494 Mon Sep 17 00:00:00 2001
    From: Vit Rosin <vit_r@list.ru>
    Date: Thu, 18 Feb 2010 16:23:26 +0000
    Subject: [PATCH]  retcheck in lib/skin/ini-file.c
    
    ---
     lib/skin/ini-file.c |    2 ++
     1 files changed, 2 insertions(+), 0 deletions(-)
    
    diff --git a/lib/skin/ini-file.c b/lib/skin/ini-file.c
    index dc39b6b..e281eec 100644
    a b mc_skin_ini_file_load (mc_skin_t * mc_skin) 
    8181    char *file_name, *user_home_dir; 
    8282 
    8383    file_name = g_path_get_basename (mc_skin->name); 
     84    if (file_name == NULL) 
     85        return FALSE; 
    8486 
    8587    if (strcmp (file_name, mc_skin->name) != 0) { 
    8688        g_free (file_name);