Check for > 7 Vendor bytes

date	2004.12.08.22.53.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 16:09:51 +00:00
parent f9ae2b4724
commit a785c1cf31
2 changed files with 22 additions and 5 deletions

View File

@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: aslrestype1 - Short (type1) resource templates and descriptors
* $Revision: 1.27 $
* $Revision: 1.28 $
*
*****************************************************************************/
@ -1041,8 +1041,23 @@ RsDoVendorSmallDescriptor (
* Process all child initialization nodes
*/
InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
for (i = 0; (InitializerOp && (i < 7)); i++)
for (i = 0; InitializerOp; i++)
{
/* Maximum 7 vendor data bytes allowed (0-6) */
if (i >= 7)
{
AslError (ASL_ERROR, ASL_MSG_VENDOR_LIST, InitializerOp, NULL);
/* Eat the excess initializers */
while (InitializerOp)
{
InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
}
break;
}
Descriptor->Smv.VendorDefined[i] = (UINT8) InitializerOp->Asl.Value.Integer;
InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
}

View File

@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: asltypes.h - compiler data types and struct definitions
* $Revision: 1.67 $
* $Revision: 1.68 $
*
*****************************************************************************/
@ -396,7 +396,8 @@ typedef enum
ASL_MSG_INVALID_UUID,
ASL_MSG_INTERRUPT_LIST,
ASL_MSG_DMA_CHANNEL,
ASL_MSG_DMA_LIST
ASL_MSG_DMA_LIST,
ASL_MSG_VENDOR_LIST
} ASL_MESSAGE_IDS;
@ -492,7 +493,8 @@ char *AslMessages [] = {
/* ASL_MSG_INVALID_UUID */ "UUID string must be of the form \"aabbccdd-eeff-gghh-iijj-kkllmmnnoopp\"",
/* ASL_MSG_INTERRUPT_LIST */ "Too many interrupts (255 max)",
/* ASL_MSG_DMA_CHANNEL */ "Invalid DMA channel (must be 0-7)",
/* ASL_MSG_DMA_LIST */ "Too many DMA channels (8 max)"
/* ASL_MSG_DMA_LIST */ "Too many DMA channels (8 max)",
/* ASL_MSG_VENDOR_LIST */ "Too many vendor data bytes (7 max)"
};