diff options
author | Richard Haines <richard_c_haines@btinternet.com> | 2015-11-23 15:56:48 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2015-11-23 15:56:48 +0000 |
commit | 3e08682ba440ab3ae74e7b19878f7d7ed95e2407 (patch) | |
tree | 0867f39f27101ec71af7b2f67b9081f25cc821d0 | |
parent | 4caaec565181b1ee6d7ed025239a8834943c1316 (diff) | |
parent | be5f860effa9aff2afb397703f64de7acf92ad6d (diff) | |
download | libselinux-3e08682ba440ab3ae74e7b19878f7d7ed95e2407.tar.gz |
Correct line count for property and service contexts files
am: be5f860eff
* commit 'be5f860effa9aff2afb397703f64de7acf92ad6d':
Correct line count for property and service contexts files
-rw-r--r-- | src/label_android_property.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/label_android_property.c b/src/label_android_property.c index af06c4a..d7ab4ba 100644 --- a/src/label_android_property.c +++ b/src/label_android_property.c @@ -132,7 +132,7 @@ static int init(struct selabel_handle *rec, const struct selinux_opt *opts, const char *path = NULL; FILE *fp; char line_buf[BUFSIZ]; - unsigned int lineno = 0, maxnspec, pass; + unsigned int lineno, maxnspec, pass; int status = -1; struct stat sb; @@ -166,6 +166,7 @@ static int init(struct selabel_handle *rec, const struct selinux_opt *opts, maxnspec = UINT_MAX / sizeof(spec_t); for (pass = 0; pass < 2; pass++) { data->nspec = 0; + lineno = 0; while (fgets(line_buf, sizeof(line_buf) - 1, fp) && data->nspec < maxnspec) { |