mirror of
https://github.com/torvalds/linux.git
synced 2024-11-08 21:21:47 +00:00
ACPICA: iASL: Enhance detection of non-ascii or corrupted input files.
ACPICA commit 08170904011f1e8f817d9e3a9f2bb2438aeacf60 For the compiler part (not disassembler). - Characters not within a comment must be be ASCII (0-0x7F), and now either printable or a "space" character. Provides better detection of files that cannot be compiled. This patch only affects iASL which is not in the Linux upstream. Link: https://github.com/acpica/acpica/commit/08170904 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
b0e01c7241
commit
a737222240
@ -251,7 +251,7 @@ extern const u8 _acpi_ctype[];
|
|||||||
#define _ACPI_DI 0x04 /* '0'-'9' */
|
#define _ACPI_DI 0x04 /* '0'-'9' */
|
||||||
#define _ACPI_LO 0x02 /* 'a'-'z' */
|
#define _ACPI_LO 0x02 /* 'a'-'z' */
|
||||||
#define _ACPI_PU 0x10 /* punctuation */
|
#define _ACPI_PU 0x10 /* punctuation */
|
||||||
#define _ACPI_SP 0x08 /* space */
|
#define _ACPI_SP 0x08 /* space, tab, CR, LF, VT, FF */
|
||||||
#define _ACPI_UP 0x01 /* 'A'-'Z' */
|
#define _ACPI_UP 0x01 /* 'A'-'Z' */
|
||||||
#define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */
|
#define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */
|
||||||
|
|
||||||
|
@ -198,11 +198,8 @@ acpi_ut_read_table(FILE * fp,
|
|||||||
table_header.length, file_size);
|
table_header.length, file_size);
|
||||||
|
|
||||||
#ifdef ACPI_ASL_COMPILER
|
#ifdef ACPI_ASL_COMPILER
|
||||||
status = fl_check_for_ascii(fp, NULL, FALSE);
|
acpi_os_printf("File is corrupt or is ASCII text -- "
|
||||||
if (ACPI_SUCCESS(status)) {
|
"it must be a binary file\n");
|
||||||
acpi_os_printf
|
|
||||||
("File appears to be ASCII only, must be binary\n");
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
return (AE_BAD_HEADER);
|
return (AE_BAD_HEADER);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user