summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}