Fix off-by-1 error in dbPutFieldLink() when checking long input string.

This commit is contained in:
Andrew Johnson
2009-06-15 22:30:27 +00:00
parent 3c19da6b3b
commit 957c869c87

View File

@@ -1136,7 +1136,7 @@ static long dbPutFieldLink(DBADDR *paddr,
switch (dbrType) {
case DBR_CHAR:
case DBR_UCHAR:
if (pstring[nRequest] != '\0')
if (pstring[nRequest - 1] != '\0')
return S_db_badDbrtype;
break;