secilc.c: Don't fail if input file is empty am: ff3c99978a
Original change: https://android-review.googlesource.com/c/platform/external/selinux/+/1701846 Change-Id: Ia9666ba8ef8ab08dbe19e989be3b45cab0b1de1e
This commit is contained in:
commit
25bb162886
1 changed files with 6 additions and 0 deletions
|
@ -268,6 +268,12 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
file_size = filedata.st_size;
|
||||
|
||||
if (!file_size) {
|
||||
fclose(file);
|
||||
file = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
buffer = malloc(file_size);
|
||||
rc = fread(buffer, file_size, 1, file);
|
||||
if (rc != 1) {
|
||||
|
|
Loading…
Reference in a new issue