[liboobs] Bug 524792 - nautilus crashed with SIGSEGV in oobs_share_smb_new()



commit 12bc2c4cbc5c16b47f843d9d205e51886a5de594
Author: Josselin Mouette <joss malsain org>
Date:   Sun Aug 16 11:06:26 2009 +0200

    Bug 524792 - nautilus crashed with SIGSEGV in oobs_share_smb_new()
    
    Passing a NULL path to share should not crash, so check that before returning. Of course, it doesnâ??t fix the root cause of the issue, that causes path to be NULL.

 oobs/oobs-share-smb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/oobs/oobs-share-smb.c b/oobs/oobs-share-smb.c
index 4074926..08773bc 100644
--- a/oobs/oobs-share-smb.c
+++ b/oobs/oobs-share-smb.c
@@ -336,7 +336,7 @@ oobs_share_smb_new (const gchar       *path,
 		    const gchar       *comment,
 		    OobsShareSMBFlags  flags)
 {
-  g_return_val_if_fail (path[0] == '/', NULL);
+  g_return_val_if_fail (path != NULL && path[0] == '/', NULL);
 
   return g_object_new (OOBS_TYPE_SHARE_SMB,
 		       "name",    name,



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