From 34293dcc8968aed3ffc0e3cee754b2e86dd566f9 Mon Sep 17 00:00:00 2001 From: slioch Date: Thu, 26 Feb 2009 11:56:12 -0800 Subject: handle seg violation if an empty line is found in the priority file. --- src/common/unionfs.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/common/unionfs.c b/src/common/unionfs.c index 1a5af0c..30da90e 100644 --- a/src/common/unionfs.c +++ b/src/common/unionfs.c @@ -760,6 +760,9 @@ apply_priority(GNode *root_node) char str[1025]; while (fgets(str, 1024, fp) != 0) { gchar** tok_str = g_strsplit(str," ",3); + if (tok_str[0] == NULL || tok_str[1] == NULL) { + continue; + } char *path = tok_str[1]; if (g_debug) { printf("unionfs::apply_priority(), working on this %s\n",path); -- cgit v1.2.3