summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunmin Lee <sunm.lee@samsung.com>2017-12-06 07:39:55 (GMT)
committerSunmin Lee <sunm.lee@samsung.com>2017-12-06 08:06:08 (GMT)
commitd423a417011d69f3be0c53382ae96437879072be (patch)
treeb5be587e4ca24ddffa37be3522d9fa566345a400
parentbbfe12cb8b0f44abdd9ebdf48c5c72bbcd55266e (diff)
downloadfactory-reset-d423a417011d69f3be0c53382ae96437879072be.zip
factory-reset-d423a417011d69f3be0c53382ae96437879072be.tar.gz
factory-reset-d423a417011d69f3be0c53382ae96437879072be.tar.bz2
Fix bug of rstsmack Change-Id: Idfb1c01e16463002a442c0097eff70182ebad4ff Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
-rw-r--r--src/rstsmack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rstsmack.c b/src/rstsmack.c
index 15fefa0..e17d696 100644
--- a/src/rstsmack.c
+++ b/src/rstsmack.c
@@ -84,7 +84,7 @@ static int parse_and_set(const char *srcfile)
while (fgets(linebuf, sizeof(linebuf), fp)) {
plabel = strstr(linebuf, " access=");
- if (plabel >= SMACK_LABEL_LEN) { // handling "The maximum input length is not specified"
+ if (plabel && strlen(plabel) >= SMACK_LABEL_LEN) { // handling "The maximum input length is not specified"
fclose(fp);
return -1;
}