Fixed off by 1 error when checking length of string in WPValidateString()

This commit is contained in:
petermcs
2012-01-21 10:30:23 +00:00
parent 0f0c41d347
commit bae2321abc
+1 -1
View File
@@ -182,7 +182,7 @@ bool WPValidateString(
/* assumption: non-empty also means must be "printable" */
*pErrorCode = ERROR_CODE_VALUE_OUT_OF_RANGE;
} else if (characterstring_length(&pValue->
type.Character_String) >= iMaxLen) {
type.Character_String) > iMaxLen) {
*pErrorClass = ERROR_CLASS_RESOURCES;
*pErrorCode = ERROR_CODE_NO_SPACE_TO_WRITE_PROPERTY;
} else