diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2018-04-27 21:30:01 +0000 |
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2018-04-27 21:30:01 +0000 |
| commit | 5dc04bcfd5c1bd0942e4a6640bf39d15f464af4f (patch) | |
| tree | 78a599bc6dc9341412480da5af5b8f78175d1d65 /source/compiler/asloperands.c | |
| parent | e44d3d8ceb12ae786d331468fe4acf41a4af5424 (diff) | |
Notes
Diffstat (limited to 'source/compiler/asloperands.c')
| -rw-r--r-- | source/compiler/asloperands.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source/compiler/asloperands.c b/source/compiler/asloperands.c index fc0eb0b87130..1d1a1a94bfcb 100644 --- a/source/compiler/asloperands.c +++ b/source/compiler/asloperands.c @@ -1061,7 +1061,7 @@ OpnDoDefinitionBlock ( if (strlen (Gbl_TableSignature) != ACPI_NAME_SIZE) { AslError (ASL_ERROR, ASL_MSG_TABLE_SIGNATURE, Child, - "Length is not exactly 4"); + "Length must be exactly 4 characters"); } for (i = 0; i < ACPI_NAME_SIZE; i++) @@ -1078,6 +1078,7 @@ OpnDoDefinitionBlock ( Child = Child->Asl.Next; Child->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG; + /* * We used the revision to set the integer width earlier */ @@ -1086,6 +1087,12 @@ OpnDoDefinitionBlock ( Child = Child->Asl.Next; Child->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG; + if (Child->Asl.Value.String && + strlen (Child->Asl.Value.String) > ACPI_OEM_ID_SIZE) + { + AslError (ASL_ERROR, ASL_MSG_OEM_ID, Child, + "Length cannot exceed 6 characters"); + } /* OEM TableID */ @@ -1094,6 +1101,12 @@ OpnDoDefinitionBlock ( if (Child->Asl.Value.String) { Length = strlen (Child->Asl.Value.String); + if (Length > ACPI_OEM_TABLE_ID_SIZE) + { + AslError (ASL_ERROR, ASL_MSG_OEM_TABLE_ID, Child, + "Length cannot exceed 8 characters"); + } + Gbl_TableId = UtLocalCacheCalloc (Length + 1); strcpy (Gbl_TableId, Child->Asl.Value.String); |
