summaryrefslogtreecommitdiff
path: root/MdePkg
diff options
context:
space:
mode:
authorjji4 <jji4@6f19259b-4bc3-4df7-8a09-765794883524>2009-01-07 09:49:12 +0000
committerjji4 <jji4@6f19259b-4bc3-4df7-8a09-765794883524>2009-01-07 09:49:12 +0000
commit340ffb0920c829d2cc020afffa8a5837ed6206b3 (patch)
treeb32516e6056b2d635976e5432ea07081e196c40b /MdePkg
parentd6039b1d6e83345e7354029ce104f87e304a5a5c (diff)
downloadedk2-platforms-340ffb0920c829d2cc020afffa8a5837ed6206b3.tar.xz
Memory overflow verified
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7204 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Library/BasePrintLib/PrintLibInternal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/MdePkg/Library/BasePrintLib/PrintLibInternal.c b/MdePkg/Library/BasePrintLib/PrintLibInternal.c
index 05e3ed501d..6f0f5e5438 100644
--- a/MdePkg/Library/BasePrintLib/PrintLibInternal.c
+++ b/MdePkg/Library/BasePrintLib/PrintLibInternal.c
@@ -81,13 +81,13 @@ BasePrintLibFillBuffer (
for (Index = 0; Index < Length && Buffer < EndBuffer; Index++) {
*Buffer = (CHAR8) Character;
*(Buffer + 1) = (CHAR8) (Character >> 8);
+ Buffer += Increment;
}
- Buffer += Increment;
} else {
for (Index = 0; Index < Length && Buffer < EndBuffer; Index++) {
*Buffer = (CHAR8) Character;
+ Buffer += Increment;
}
- Buffer += Increment;
}
return Buffer;
}