summaryrefslogtreecommitdiff
path: root/src/common/unionfs.c
diff options
context:
space:
mode:
authorslioch <slioch@eng-140.vyatta.com>2009-02-26 11:56:12 -0800
committerslioch <slioch@eng-140.vyatta.com>2009-02-26 11:56:12 -0800
commit34293dcc8968aed3ffc0e3cee754b2e86dd566f9 (patch)
tree88b73b9290b7eddbc921b9e08a123f4486ea68ef /src/common/unionfs.c
parent497b701ebcb25bb01824d9b5b742711179730664 (diff)
downloadvyatta-cfg-34293dcc8968aed3ffc0e3cee754b2e86dd566f9.tar.gz
vyatta-cfg-34293dcc8968aed3ffc0e3cee754b2e86dd566f9.zip
handle seg violation if an empty line is found in the priority file.
Diffstat (limited to 'src/common/unionfs.c')
-rw-r--r--src/common/unionfs.c3
1 files changed, 3 insertions, 0 deletions
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);