Blob Blame History Raw
commit cdacc71af14045c08d1b357981ba36ae722dd47e
Author:     Robert Moore <Robert.Moore@intel.com>
AuthorDate: Fri Jun 19 09:43:28 2015 -0700
Commit:     Robert Moore <Robert.Moore@intel.com>
CommitDate: Fri Jun 19 09:43:28 2015 -0700

    iASL: Add a status check after an fopen().
    
    In FlCheckForAscii. ACPICA BZ 1170.

diff --git a/source/compiler/aslascii.c b/source/compiler/aslascii.c
index 7ff1c4a..f164e98 100644
--- a/source/compiler/aslascii.c
+++ b/source/compiler/aslascii.c
@@ -177,6 +177,11 @@ FlCheckForAscii (
     /* Open file in text mode so file offset is always accurate */
 
     Handle = fopen (Filename, "rb");
+    if (!Handle)
+    {
+        perror ("Could not open input file");
+        return (AE_ERROR);
+    }
 
     Status.Line = 1;
     Status.Offset = 0;