summaryrefslogtreecommitdiff
path: root/source/compiler/dtio.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler/dtio.c')
-rw-r--r--source/compiler/dtio.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/compiler/dtio.c b/source/compiler/dtio.c
index 5c57b5fa5ba7..25d84ab059cc 100644
--- a/source/compiler/dtio.c
+++ b/source/compiler/dtio.c
@@ -45,6 +45,7 @@
#include "aslcompiler.h"
#include "dtcompiler.h"
+#include "acapps.h"
#define _COMPONENT DT_COMPILER
ACPI_MODULE_NAME ("dtio")
@@ -737,7 +738,11 @@ DtScanFile (
/* Get the file size */
- Gbl_InputByteCount = DtGetFileSize (Handle);
+ Gbl_InputByteCount = CmGetFileSize (Handle);
+ if (Gbl_InputByteCount == ACPI_UINT32_MAX)
+ {
+ AslAbort ();
+ }
Gbl_CurrentLineNumber = 0;
Gbl_CurrentLineOffset = 0;
@@ -816,7 +821,12 @@ DtOutputBinary (
/* Walk the entire parse tree, emitting the binary data */
DtWalkTableTree (RootTable, DtWriteBinary, NULL, NULL);
- Gbl_TableLength = DtGetFileSize (Gbl_Files[ASL_FILE_AML_OUTPUT].Handle);
+
+ Gbl_TableLength = CmGetFileSize (Gbl_Files[ASL_FILE_AML_OUTPUT].Handle);
+ if (Gbl_TableLength == ACPI_UINT32_MAX)
+ {
+ AslAbort ();
+ }
}