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:
Yi-Yo Chiang 2021-05-11 10:45:40 +00:00 committed by Automerger Merge Worker
commit 25bb162886

View file

@ -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) {