6c6
< * $Revision: 1.74 $
---
> * $Revision: 1.79 $
14c14
< * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
---
> * Some or all of this work - Copyright (c) 1999 - 2007, Intel Corp.
582c582
< ACPI_MEM_FREE (Fnode);
---
> ACPI_FREE (Fnode);
929c929,930
< char *s = MsgBuffer;
---
> char *StringBuffer = MsgBuffer;
> char *EndBuffer = MsgBuffer + ASL_MSG_BUFFER_SIZE;
935d935
< UINT8 StringLength = 0;
947,957d946
< StringLength++;
< if (StringLength == ACPI_MAX_STRING_CONVERSION)
< {
< /* Emit error only once, but keep going */
<
< AslCommonError (ASL_ERROR, ASL_MSG_STRING_LENGTH,
< Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
< Gbl_CurrentLineOffset, Gbl_CurrentColumn,
< Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
< }
<
1076,1077c1065,1070
< *s = (char) Digit;
< s++;
---
> *StringBuffer = (char) Digit;
> StringBuffer++;
> if (StringBuffer >= EndBuffer)
> {
> goto BufferOverflow;
> }
1117,1118c1110,1115
< *s = (char) Digit;
< s++;
---
> *StringBuffer = (char) Digit;
> StringBuffer++;
> if (StringBuffer >= EndBuffer)
> {
> goto BufferOverflow;
> }
1135,1136c1132,1137
< *s = StringChar;
< s++;
---
> *StringBuffer = StringChar;
> StringBuffer++;
> if (StringBuffer >= EndBuffer)
> {
> goto BufferOverflow;
> }
1153c1154
< *s = 0;
---
> *StringBuffer = 0;
1167a1169,1179
>
>
> BufferOverflow:
>
> /* Literal was too long */
>
> AslCommonError (ASL_ERROR, ASL_MSG_STRING_LENGTH,
> Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
> Gbl_CurrentLineOffset, Gbl_CurrentColumn,
> Gbl_Files[ASL_FILE_INPUT].Filename, "Max length 4096");
> return (FALSE);
< * $Revision: 1.74 $
---
> * $Revision: 1.79 $
14c14
< * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
---
> * Some or all of this work - Copyright (c) 1999 - 2007, Intel Corp.
582c582
< ACPI_MEM_FREE (Fnode);
---
> ACPI_FREE (Fnode);
929c929,930
< char *s = MsgBuffer;
---
> char *StringBuffer = MsgBuffer;
> char *EndBuffer = MsgBuffer + ASL_MSG_BUFFER_SIZE;
935d935
< UINT8 StringLength = 0;
947,957d946
< StringLength++;
< if (StringLength == ACPI_MAX_STRING_CONVERSION)
< {
< /* Emit error only once, but keep going */
<
< AslCommonError (ASL_ERROR, ASL_MSG_STRING_LENGTH,
< Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
< Gbl_CurrentLineOffset, Gbl_CurrentColumn,
< Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
< }
<
1076,1077c1065,1070
< *s = (char) Digit;
< s++;
---
> *StringBuffer = (char) Digit;
> StringBuffer++;
> if (StringBuffer >= EndBuffer)
> {
> goto BufferOverflow;
> }
1117,1118c1110,1115
< *s = (char) Digit;
< s++;
---
> *StringBuffer = (char) Digit;
> StringBuffer++;
> if (StringBuffer >= EndBuffer)
> {
> goto BufferOverflow;
> }
1135,1136c1132,1137
< *s = StringChar;
< s++;
---
> *StringBuffer = StringChar;
> StringBuffer++;
> if (StringBuffer >= EndBuffer)
> {
> goto BufferOverflow;
> }
1153c1154
< *s = 0;
---
> *StringBuffer = 0;
1167a1169,1179
>
>
> BufferOverflow:
>
> /* Literal was too long */
>
> AslCommonError (ASL_ERROR, ASL_MSG_STRING_LENGTH,
> Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
> Gbl_CurrentLineOffset, Gbl_CurrentColumn,
> Gbl_Files[ASL_FILE_INPUT].Filename, "Max length 4096");
> return (FALSE);